Reboot question
-
hi guys
i want to make a script that reboots at some event the box
looking over the net i've seen people using rc.stop_pckg command before the actual reboot command
is it necessary? in the log i saw that it does stop the processes but the system has time to restart some of them before the actual shutdown. doesn't this cause some issues?
thank you -
Take a look at /etc/rc.initial.reboot
-
@stephenw10
thanks
so i should use system_reboot_sync(), right? -
Yes or just system_reboot(), both are in system.inc so include that.
Or just replicate the parts of system_reboot_cleanup() you might need. Which is basically just stop packages unless you are running captive portal. Then just use /etc/rc.reboot.
Steve
-
@stephenw10 thank you again!
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.