aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-13 22:56:15 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-13 22:56:15 +0000
commit482f5f96b568335ca94e62549ae5c47bfae6867b (patch)
treed25f203774d14eaffa01152cbef1263d114ab21c
parent7b8daac747c12fdf412463dd4e3d0cb089f22506 (diff)
downloadpfsense-packages-482f5f96b568335ca94e62549ae5c47bfae6867b.tar.gz
pfsense-packages-482f5f96b568335ca94e62549ae5c47bfae6867b.tar.bz2
pfsense-packages-482f5f96b568335ca94e62549ae5c47bfae6867b.zip
* Sync package before appending to squid.conf
* Change process_kill_command to squid * Remove sed commands that where being used to backup squid.conf since sync_package("squid") will recreate squid.conf
-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>