diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2006-12-19 21:58:10 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2006-12-19 21:58:10 +0000 |
commit | 1254fe14015d96451c29a30b46875a325ae37a97 (patch) | |
tree | d43e90317c0e82834736de7329443dae9ea647d2 | |
parent | 92d04b4b8ae266fef55700651525b1203674ae3c (diff) | |
download | pfsense-packages-1254fe14015d96451c29a30b46875a325ae37a97.tar.gz pfsense-packages-1254fe14015d96451c29a30b46875a325ae37a97.tar.bz2 pfsense-packages-1254fe14015d96451c29a30b46875a325ae37a97.zip |
- transparent and gui on port 80 are not allowed.
- Add log dir option
- If squid not running after install, start. Otherwise reload
-rw-r--r-- | packages/squid.inc | 14 | ||||
-rw-r--r-- | packages/squid.xml | 8 |
2 files changed, 20 insertions, 2 deletions
diff --git a/packages/squid.inc b/packages/squid.inc index deab63d9..c10217a0 100644 --- a/packages/squid.inc +++ b/packages/squid.inc @@ -183,7 +183,11 @@ function squid_validate_general($post, $input_errors) { } else { $port = trim($post['proxy_port']); } + $webgui_port = $config['system']['webgui']['port']; + if($config['system']['webgui']['port'] == "") { + $webgui_port = 80; + } if ($port == $webgui_port) { $input_errors[] = "You can not run squid on the same port as the webgui"; @@ -738,8 +742,14 @@ function squid_resync() { } - log_error("Reloading Squid for configuration sync"); - mwexec("/usr/local/sbin/squid -k reconfigure"); + if (!is_service_running('squid')) { + log_error("Starting Squid"); + mwexec_bg("/usr/local/sbin/squid -D"); + mwexec_bg("/usr/local/etc/rc.d/proxy_monitor.sh"); + } else { + log_error("Reloading Squid for configuration sync"); + mwexec("/usr/local/sbin/squid -k reconfigure"); + } filter_configure(); } diff --git a/packages/squid.xml b/packages/squid.xml index 09326f4b..13398b3d 100644 --- a/packages/squid.xml +++ b/packages/squid.xml @@ -113,6 +113,14 @@ <type>checkbox</type> </field> <field> + <fieldname>log_dir</fieldname> + <fielddescr>Log store directory</fielddescr> + <description>The directory where the log will be stored (note: do not end with a / mark)</description> + <type>input</type> + <size>60</size> + <default_value>/var/squid/log</default_value> + </field> + <field> <fieldname>proxy_port</fieldname> <fielddescr>Proxy port</fielddescr> <description>This is the port the proxy server will listen on.</description> |