› Forums › Network Management › ZeroShell › Save not interfaced settings in database
- This topic is empty.
-
AuthorPosts
-
January 24, 2010 at 6:19 pm #42161
oguretz
MemberHi 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.
January 24, 2010 at 6:41 pm #49447atheling
MemberPut the command you are running to setup your routing table, etc. into either the pre boot script or the post boot script.
January 24, 2010 at 8:14 pm #49448oguretz
Memberwhich of them? can you tip, which script is not reseting during reboot? Thank you!
January 24, 2010 at 8:34 pm #49449atheling
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.
January 24, 2010 at 9:00 pm #49450oguretz
MemberI 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
January 24, 2010 at 11:14 pm #49451ppalias
MemberCreate 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.January 25, 2010 at 12:44 am #49452atheling
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.
-
AuthorPosts
- You must be logged in to reply to this topic.