aboutsummaryrefslogtreecommitdiffstats
path: root/packages/squid.xml
diff options
context:
space:
mode:
Diffstat (limited to 'packages/squid.xml')
-rw-r--r--packages/squid.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/squid.xml b/packages/squid.xml
index b583a896..f2eccb40 100644
--- a/packages/squid.xml
+++ b/packages/squid.xml
@@ -61,6 +61,8 @@
</fields>
<custom_php_command_before_form>
function sync_package() {
+ conf_mount_rw();
+ config_lock();
system("/bin/mkdir /usr/local/etc/squid 2>/dev/null");
$lancfg = $config['interfaces']['lan'];
$lanif = $lancfg['if'];
@@ -97,6 +99,8 @@
fwrite($fout, "#!/bin/sh\n");
fwrite($fout, "/usr/local/sbin/squid\n\n");
fclose($fout);
+ conf_mount_ro();
+ config_unlock();
system("chmod a+x /usr/local/etc/rc.d/squid.sh");
system("/usr/local/sbin/squid -z");
system("/usr/local/sbin/squid");