Cron job to power off pfSense?
-
Every night to save energy I shut down the pfSense box, but I often forget. Is there a cron job that can do this automatically? What would the syntax be?
thanks!
edit
I am going to take a crack at this (but I cannot test it now, must wait about 5 hours)./sbin/shutdown -h
Is this correct?
-
think there is an rc.shutdown script… (in /etc)
-
think there is an rc.shutdown script… (in /etc)
Yes, found it! So the syntax would just be:
/etc/rc.shutdown
?
-
think there is an rc.shutdown script… (in /etc)
Yes, found it! So the syntax would just be:
/etc/rc.shutdown
?
Believe so… just try it from the command prompt.
-
OK, after hours I played with it and got it working. This code powers off the pfSense:
/sbin/shutdown -p now
-
On FreeBSD the single word command is 'poweroff' (vs 'halt' on Linux). Just making a note for if anybody searches for this.