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 /packages/squid.inc | |
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
Diffstat (limited to 'packages/squid.inc')
-rw-r--r-- | packages/squid.inc | 14 |
1 files changed, 12 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(); } |