squidGuard
['installedpackages']['squidGuard']['config']
echo "<pre>";
$fout = fopen("/usr/local/etc/squid/squidGuard.conf","w");
fwrite($fout, "# cat squidGuard.conf\n");
fwrite($fout, "dbhome /var/db/squidGuard\n");
fwrite($fout, "logdir /usr/local/squid/logs\n");
fwrite($fout, "acl {\n");
fwrite($fout, "\t default {\n");
fwrite($fout, "\t pass all\n");
fwrite($fout, "\t }\n");
fwrite($fout, "}\n");
fclose($fout);
$fout = fopen("/usr/local/etc/squid/squid.conf","w");
fwrite($fout, "redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf\n");
fwrite($fout, "redirect_children 4\n");
fclose($fout);
mwexec("/usr/bin/touch /usr/local/squid/logs/squidGuard.log");
mwexec("/usr/sbin/chown squid /usr/local/squid/logs/squidGuard.log");
mwexec("/usr/bin/chgrp squid /usr/local/squid/logs/squidGuard.log");
mwexec("/bin/chmod 744 /usr/local/squid/logs/squidGuard.log");
mwexec("/usr/sbin/chown -R squid /var/db/squidGuard");
mwexec("/usr/bin/chgrp -R squid /var/db/squidGuard");
mwexec("/bin/chmod -R 755 /var/db/squidGuard");
system("/usr/local/sbin/squid -k reconfigure");
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 -rf /var/db/squidGuard");
system("/usr/local/sbin/squid -k reconfigure");
squidGuard