Reboot and commence script

Discussion in 'Tomato Firmware' started by yaqui, Jun 9, 2007.

  1. yaqui

    yaqui LI Guru Member

    Is there any way with a script to reboot the router, have the script survive the reboot and continue with additional commands in the same script??

    If so, can you provide example please?
  2. digitalgeek

    digitalgeek Network Guru Member

    What is it you want to accomplish...?

    The reboot process is as effective as unplugging the power cord, so all ram is cleared and the OS and applications are restarted. All state will be lost.
  3. affer

    affer LI Guru Member

    Add a call to the script that you want to continue in the firewall script. When the router reboots, it will execute the firewall script, since that is preserved in NV memory.

    Check if the external script exists with an if; then; do; done. else; fi framework. So you can jump in and out of either script as you like, depending on the shutdown state or other variables. And if the external script does not exist, then the firewall script terminates without incident. If you had told us what you were specifically trying to do, we might have been able to give you some more meaningful examples.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice