Save not interfaced settings in database

Home Page Forums Network Management ZeroShell Save not interfaced settings in database

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #42161
    oguretz
    Member

    Hi all.

    Is it possible to save settings not displayed in web interface in way they will be restored after reboot? For example, I have modified routing table, added routing rules and slightly modify iptables manually (all from ssh console), but all settings are lost after reboot. Can I save all i’ve done in database, or maybe i should add some script etc.?

    Any help greatly appreciated. Thank you.

    #49447
    atheling
    Member

    Put the command you are running to setup your routing table, etc. into either the pre boot script or the post boot script.

    #49448
    oguretz
    Member

    which of them? can you tip, which script is not reseting during reboot? Thank you!

    #49449
    atheling
    Member

    @oguretz wrote:

    which of them? can you tip, which script is not reseting during reboot? Thank you!

    Neither script will disappear. The pre-boot script runs before the built in Zeroshell scripts. The post-boot script runs after the built-in Zeroshell scripts.

    I use the pre-boot script to patch Zeroshell scripts. I use the post-boot script to setup iptable entries that I can’t do from the UI.

    #49450
    oguretz
    Member

    I understand, but i mean to help me with location of this scripts, please tell the exact one 🙂 i just can’t find any docs about it

    #49451
    ppalias
    Member

    Create a file containing all the commands you wish to apply after the reboot.
    Save this file in

    /Database/patches/

    make it executable, then go to the Web Interface : System->Setup->Startup/Cron
    add a post boot script that will execute the script, test it and finally save.

    #49452
    atheling
    Member

    @oguretz wrote:

    I understand, but i mean to help me with location of this scripts, please tell the exact one 🙂 i just can’t find any docs about it

    On the left, click on “setup”. Then there will be at tab across the top that says “startup/cron”, click that. The window that opens will have a number of choices. You can paste your code into the “post boot” area and save.

    Or you can do as ppalias suggests and save a script and execute it from the post boot script.

    Edit: I just checked, and I actually have put my iptables changes into the “NAT and virtual servers” script rather than the post boot script. You have a number of options.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.