aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/squidGuard.xml14
1 files changed, 5 insertions, 9 deletions
diff --git a/packages/squidGuard.xml b/packages/squidGuard.xml
index ab4ea972..67abff0e 100644
--- a/packages/squidGuard.xml
+++ b/packages/squidGuard.xml
@@ -7,9 +7,9 @@
<configpath>['installedpackages']['squidGuard']['config']</configpath>
<custom_php_install_command>
echo "&lt;pre&gt;";
- sync_package("squid");
$fout = fopen("/usr/local/etc/squid/squidGuard.conf","w");
- fwrite($fout, "# cat squidGuard.conf\n");
+ fwrite($fout, "# This configuration was generated by the pfSense package manager.\n");
+ fwrite($fout, "# cat squidGuard.conf\n\n");
fwrite($fout, "dbhome /var/db/squidGuard\n");
fwrite($fout, "logdir /usr/local/squid/logs\n");
fwrite($fout, "acl {\n");
@@ -18,6 +18,7 @@
fwrite($fout, "\t }\n");
fwrite($fout, "}\n");
fclose($fout);
+ sync_package("squid");
$fout = fopen("/usr/local/etc/squid/squid.conf","a");
fwrite($fout, "redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf\n");
fwrite($fout, "redirect_children 4\n");
@@ -38,15 +39,10 @@
<custom_php_pre_deinstall_command>
</custom_php_pre_deinstall_command>
<custom_php_deinstall_command>
- mwexec("/usr/bin/sed '\$d' /usr/local/etc/squid/squid.conf > /tmp/squidtmp.conf");
- mwexec("/bin/cp /tmp/squidtmp.conf /usr/local/etc/squid/squid.conf");
- mwexec("/usr/bin/sed '\$d' /usr/local/etc/squid/squid.conf > /tmp/squidtmp.conf");
- mwexec("/bin/cp /tmp/squidtmp.conf /usr/local/etc/squid/squid.conf");
- mwexec("/bin/rm /tmp/squidtmp.conf");
- mwexec("/bin/rm /var/log/squidGuard.lovar/log/squidGuard.log
+ mwexec("/bin/rm -rf /var/log/squidGuard.lovar/log/squidGuard.log
mwexec("/bin/rm -rf /var/db/squidGuard");
sync_package("squid");
system("/usr/local/sbin/squid -k reconfigure");
</custom_php_deinstall_command>
- <process_kill_command>squidGuard</process_kill_command>
+ <process_kill_command>squid</process_kill_command>
</packagegui>