From 1254fe14015d96451c29a30b46875a325ae37a97 Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Tue, 19 Dec 2006 21:58:10 +0000 Subject: - transparent and gui on port 80 are not allowed. - Add log dir option - If squid not running after install, start. Otherwise reload --- packages/squid.inc | 14 ++++++++++++-- packages/squid.xml | 8 ++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'packages') 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 @@ -112,6 +112,14 @@ log_query_terms,log_user_agents checkbox + + log_dir + Log store directory + The directory where the log will be stored (note: do not end with a / mark) + input + 60 + /var/squid/log + proxy_port Proxy port -- cgit v1.2.3