Hi all
I would like to know if it is possible to send a "Shutdown" command from a RPI to my ClearOS.
I run domoticz on the RPI and i can monitor the UPS load and battery status to shutdown at a predetermined value.
I would prefer to NOT connect the UPS to ClearOS as i have a few things connected to it.
I would like to know if it is possible to send a "Shutdown" command from a RPI to my ClearOS.
I run domoticz on the RPI and i can monitor the UPS load and battery status to shutdown at a predetermined value.
I would prefer to NOT connect the UPS to ClearOS as i have a few things connected to it.
In Water Cooler
Share this post:
Responses (3)
-
Accepted Answer
I don't see why you can't. Set up ssh keys - private on the Pi and public on ClearOS - then from the Pi send the command:
It is a bit brutal as if forcibly closes the ssh session rather than politely. You could instead try something like:ssh root@clearos_IP 'poweroff'
This gives a 1 minute delay from issuing the command. I am not sure how to get the delay smaller as the increment is in minutes. +0 is equivalent to the "poweroff" command.ssh root@clearos_IP 'shutdown -h +1 & exit'
-
Accepted Answer
-
Accepted Answer
Leon,
While I think the propsal from Nick might be the easiest to implement as a domoticz triggered script on the RPI, I just want to say (Slightly off-topic maybe): Do you know that you can run Domoticz on ClearOS too, either as a replacement for the RPI (if you are not using RPI specific stuff etc) or as a complement running both of them in a master-slave config? I am maintaining a package in the clearos-contribs repo. There is also an app in the clearos market place if you prefer an easy setup.
I have however not tried to run master-slave configurations, so I can not give you any advice on it.
/Fred
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »