Hi,
Apologies for the title.. not sure of the best way to explain what i want to achieve in a couple of words.
We use RB's as a cellular router to allow internet connectivity to Raspberry PI's. The RPI's are connected via Ethernet to the RB but powered via the USB port.
Occasionally we have a cellular disconnection so we have scripts that run to ping google and if no reply restart the LTE interface. All works great so far. Sometimes when the LTE interface stops working for one reason or another the RPI stops transmitting so it needs a reboot.
We have another script that reboots the RB once a day to reset the power via USB to the RPI. On the RPI we have a cron job that shuts it down 5 mins before the RB reboot script runs to protect the file system from corruption and once run the RPI reboots as power is restored
What i would like is rather than having this set to run once a day is to automate it via google ping, so no response from google the LTE interface is reset AND resets the USB power, however prior to this i want to issue a shut down command to the RPI. I get the shutdown command may not work due to non connectivity but i at least want to try.
So to cut a long story short... is there a way to issue a shutdown command to the RPI using specific login details for the RPI via a RB script. i.e. remote connect and login into a third party Linux device and issue a command ?
Any pointers woudl be greatly appreciated.
Many Thanks