diff options
author | bkw <bkw> | 2005-08-20 18:55:23 +0000 |
---|---|---|
committer | bkw <bkw> | 2005-08-20 18:55:23 +0000 |
commit | 4b2f8b3ada4445fb7962c42ac5c58d208c5a5736 (patch) | |
tree | 31bbf3517ac8926da29de6f77eea7e47635a08ca | |
parent | 6e1dfcb9dd36b0cd1fd59a5cef7c5a92d5116d36 (diff) | |
download | pfsense-packages-4b2f8b3ada4445fb7962c42ac5c58d208c5a5736.tar.gz pfsense-packages-4b2f8b3ada4445fb7962c42ac5c58d208c5a5736.tar.bz2 pfsense-packages-4b2f8b3ada4445fb7962c42ac5c58d208c5a5736.zip |
remove text from file function added. spaces removed.
-rw-r--r-- | packages/squidGuard.xml | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/packages/squidGuard.xml b/packages/squidGuard.xml index 217ba3f3..5555daf2 100644 --- a/packages/squidGuard.xml +++ b/packages/squidGuard.xml @@ -6,73 +6,59 @@ fwrite($fout, "# This configuration was generated by the pfSense package manager.\n");
fwrite($fout, "logdir /usr/local/squid/logs\n");
fwrite($fout, "dbhome /var/db/squidGuard\n");
-
fwrite($fout, "dest ads {\n");
fwrite($fout, "\t domainlist\t ads/domains\n");
fwrite($fout, "\t urllist\t ads/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest aggressive {\n");
fwrite($fout, "\t domainlist\t aggressive/domains\n");
fwrite($fout, "\t urllist\t aggressive/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest audio-video {\n");
fwrite($fout, "\t domainlist\t audio-video/domains\n");
fwrite($fout, "\t urllist\t audio-video/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest drugs {\n");
fwrite($fout, "\t domainlist\t drugs/domains\n");
fwrite($fout, "\t urllist\t drugs/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest gambling {\n");
fwrite($fout, "\t domainlist\t gambling/domains\n");
fwrite($fout, "\t urllist\t gambling/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest gambling {\n");
fwrite($fout, "\t domainlist\t gambling/domains\n");
fwrite($fout, "\t urllist\t gambling/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest hacking {\n");
fwrite($fout, "\t domainlist\t hacking/domains\n");
fwrite($fout, "\t urllist\t hacking/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest mail {\n");
fwrite($fout, "\t domainlist\t mail/domains\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest porn {\n");
fwrite($fout, "\t domainlist\t porn/domains\n");
fwrite($fout, "\t urllist\t porn/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest proxy {\n");
fwrite($fout, "\t domainlist\t proxy/domains\n");
fwrite($fout, "\t urllist\t proxy/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest violence {\n");
fwrite($fout, "\t domainlist\t violence/domains\n");
fwrite($fout, "\t urllist\t violence/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "dest warez {\n");
fwrite($fout, "\t domainlist\t warez/domains\n");
fwrite($fout, "\t urllist\t warez/urls\n");
fwrite($fout, "}\n");
-
fwrite($fout, "acl {\n");
fwrite($fout, "\t default {\n");
fwrite($fout, "\t pass !ads !aggressive !audio-video !drugs !gambling !hacking !mail !porn !proxy !violence !warez all\n");
fwrite($fout, "\t redirect http://bkw.lindesign.se/tmp/denied.html");
fwrite($fout, "\t }\n");
fwrite($fout, "}\n");
-
fclose($fout);
sync_package("squid");
$fout = fopen("/usr/local/etc/squid/squid.conf","a");
@@ -89,7 +75,9 @@ <custom_php_deinstall_command>
unlink_if_exists("/var/log/squidGuard.log");
rmdir_recursive("/var/db/squidGuard");
- sync_package("squid");
+ remove_text_from_file("/usr/local/etc/squid/squid.conf", "redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf");
+ sync_package("squid");
+ mwexec("/usr/local/sbin/squid -k reconfigure");
</custom_php_deinstall_command>
<process_kill_command>squid</process_kill_command>
</packagegui>
|