Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
How to keep changes in opnsense files after reboot?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to keep changes in opnsense files after reboot? (Read 3647 times)
aynar
Newbie
Posts: 14
Karma: 1
How to keep changes in opnsense files after reboot?
«
on:
January 18, 2018, 05:00:33 pm »
hi everybody
I changed the access.log path in the squid.conf file and I added a line in crontab -e
but I lose the configuration once the machine is restarted
how can i keep my changes after reboot?
Thanks.
Logged
fabian
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: How to keep changes in opnsense files after reboot?
«
Reply #1 on:
January 18, 2018, 05:05:14 pm »
For the cron stuff: use a configd call and add it via the GUI.
Squid: use one of the plugin hooks. The configuration file is generated.
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: How to keep changes in opnsense files after reboot?
«
Reply #2 on:
January 18, 2018, 06:02:06 pm »
OPNsense tries very hard to keep a consistent configuration of itself during reconfigure, reboot and firmware updates as not doing so could affect operation in a negative way.
There are, however, plenty of plugin hooks for all sorts of requirements.
It's easer to tell exactly what you want to achieve instead of what you did, so we can help find the best solution.
Cheers,
Franco
Logged
aynar
Newbie
Posts: 14
Karma: 1
Re: How to keep changes in opnsense files after reboot?
«
Reply #3 on:
January 19, 2018, 01:05:49 pm »
thanks for the help
fabian I did not understand the proposed solution
i'll explain i just want to change the path accesslog in the squidconfig file to make lightsquid work
and crontab -e it is to run the lightparserpl automatically every 15min
and it works
except that I lose this config after rebooting
my goal is just to make lightsquid work
Logged
fabian
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: How to keep changes in opnsense files after reboot?
«
Reply #4 on:
January 20, 2018, 11:36:04 am »
You need a configd config file and add lines like in the IDS:
https://github.com/opnsense/core/blob/master/src/opnsense/service/conf/actions.d/actions_ids.conf#L67-L72
Then you can schedule it via the GUI and it will survive a reboot (in addition it will be restored after a reinstall if you create the configd command again.
For squid: maybe it is easier to specify the path to the squid log file in the lightsquid call or you can solve it via a symbolic link. The path should not be changed because you will break the GUI log viewer.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
How to keep changes in opnsense files after reboot?