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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy