diff options
author | bkw <bkw> | 2005-03-15 23:06:01 +0000 |
---|---|---|
committer | bkw <bkw> | 2005-03-15 23:06:01 +0000 |
commit | 9bea15deb098e44d59674836fbb18d095ac3f837 (patch) | |
tree | 7260a221ed9b46ec11299e6919336b3b738da041 | |
parent | 9de47eaa0986973e65166bf716e62aecd5398da0 (diff) | |
download | pfsense-packages-9bea15deb098e44d59674836fbb18d095ac3f837.tar.gz pfsense-packages-9bea15deb098e44d59674836fbb18d095ac3f837.tar.bz2 pfsense-packages-9bea15deb098e44d59674836fbb18d095ac3f837.zip |
dir creation, permissions, user/groups add,remove
-rw-r--r-- | packages/squid.xml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/packages/squid.xml b/packages/squid.xml index bcb20981..1f06580c 100644 --- a/packages/squid.xml +++ b/packages/squid.xml @@ -8,8 +8,9 @@ <custom_php_install_command> echo "<pre>"; system("/bin/mkdir /usr/local/etc/squid"); - system("/usr/bin/touch /usr/local/etc/squid/mime.conf"); - $lancfg = $config['interfaces']['lan']; + system("/usr/sbin/pw adduser squid -s /bin/false"); + system("/usr/sbin/pw addgroup squid"); + $lancfg = $config['interfaces']['lan']; $lanif = $lancfg['if']; $lanip = $lancfg['ipaddr']; $lansa = gen_subnet($lancfg['ipaddr'], $lancfg['subnet']); @@ -38,13 +39,20 @@ fwrite($fout, "httpd_accel_uses_host_header on\n"); fwrite($fout, "cache_effective_user squid\n"); fwrite($fout, "cache_effective_group squid\n"); - fclose($fout); + fclose($fout); $fout = fopen("/usr/local/etc/rc.d/squid.sh","w"); fwrite($fout, "#!/bin/sh\n"); fwrite($fout, "/usr/local/sbin/squid\n\n"); fclose($fout); system("chmod a+x /usr/local/etc/rc.d/squid.sh"); - system("/usr/local/sbin/squid -z"); + system("/usr/bin/touch /usr/local/etc/squid/mime.conf"); + system("/bin/mkdir /usr/local/squid"); + system("/bin/mkdir /usr/local/squid/cache"); + system("/bin/mkdir /usr/local/libexec/squid"); + system("chown -R squid:squid /usr/local/squid"); + system("chown -R squid:squid /usr/local/etc/squid"); + system("chown -R squid:squid /usr/local/libexec/squid"); + system("/usr/local/sbin/squid -z"); system("/usr/local/sbin/squid"); filter_configure(); </custom_php_install_command> @@ -57,7 +65,9 @@ exec("rm -rf /usr/local/squid/"); exec("rm -rf /usr/local/etc/squid/"); exec("rm -rf /usr/local/libexec/squid/"); + exec("/usr/sbin/pw deluser squid"); + exec("/usr/sbin/pw delgroup squid"); </custom_php_deinstall_command> <start_command>/usr/local/sbin/squid</start_command> <process_kill_command>squid</process_kill_command> -</packagegui>
\ No newline at end of file +</packagegui> |