diff options
author | Phil Davis <phil.davis@world.inf.org> | 2013-01-06 17:30:53 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@world.inf.org> | 2013-01-06 17:30:53 +0545 |
commit | 3598a1ce126a8c903329b230e46a6c38eae050fb (patch) | |
tree | 9e501b7e9d43dad08224abb0a2cdaefabb556ae6 | |
parent | e1bea5a33c2eaab8a35c9ee802bf0f19c869c12a (diff) | |
download | pfsense-packages-3598a1ce126a8c903329b230e46a6c38eae050fb.tar.gz pfsense-packages-3598a1ce126a8c903329b230e46a6c38eae050fb.tar.bz2 pfsense-packages-3598a1ce126a8c903329b230e46a6c38eae050fb.zip |
Replace proxy_monitor with sqp_monitor and sqpmon
-rw-r--r-- | config/squid-reverse/squid.inc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/config/squid-reverse/squid.inc b/config/squid-reverse/squid.inc index 4212861e..941395f6 100644 --- a/config/squid-reverse/squid.inc +++ b/config/squid-reverse/squid.inc @@ -282,6 +282,10 @@ function squid_install_command() { squid_write_rcfile(); if(file_exists("/usr/local/pkg/swapstate_check.php")) exec("/bin/chmod a+x /usr/local/pkg/swapstate_check.php"); + write_rcfile(array( + "file" => "sqp_monitor.sh", + "start" => "/usr/local/pkg/sqpmon.sh &", + "stop" => "ps awux | grep \"sqpmon\" | grep -v \"grep\" | grep -v \"php\" | awk '{ print $2 }' | xargs kill")); foreach (array( SQUID_CONFBASE, SQUID_ACLDIR, @@ -295,7 +299,7 @@ function squid_install_command() { /* kill any running proxy alarm scripts */ update_status("Checking for running processes... One moment please..."); log_error("Stopping any running proxy monitors"); - mwexec("ps awux | grep \"proxy_monitor\" | grep -v \"grep\" | grep -v \"php\" | awk '{ print $2 }' | xargs kill"); + mwexec("/usr/local/etc/rc.d/sqp_monitor.sh stop"); sleep(1); if (!file_exists(SQUID_CONFBASE . '/mime.conf') && file_exists(SQUID_CONFBASE . '/mime.conf.default')) @@ -316,7 +320,7 @@ function squid_install_command() { /* restart proxy alarm scripts */ log_error("Starting a proxy monitor script"); - mwexec_bg("/usr/local/etc/rc.d/proxy_monitor.sh"); + mwexec_bg("/usr/local/etc/rc.d/sqp_monitor.sh start"); update_status("Reconfiguring filter... One moment please..."); filter_configure(); @@ -337,8 +341,8 @@ function squid_deinstall_command() { mwexec('rm -rf $cachedir/swap.state'); mwexec('rm -rf $logdir'); update_status("Finishing package cleanup."); - mwexec('rm -f /usr/local/etc/rc.d/proxy_monitor.sh'); - mwexec("ps awux | grep \"proxy_monitor\" | grep -v \"grep\" | grep -v \"php\" | awk '{ print $2 }' | xargs kill"); + mwexec("/usr/local/etc/rc.d/sqp_monitor.sh stop"); + mwexec('rm -f /usr/local/etc/rc.d/sqp_monitor.sh'); mwexec("ps awux | grep \"squid\" | grep -v \"grep\" | awk '{ print $2 }' | xargs kill"); mwexec("ps awux | grep \"dnsserver\" | grep -v \"grep\" | awk '{ print $2 }' | xargs kill"); mwexec("ps awux | grep \"unlinkd\" | grep -v \"grep\" | awk '{ print $2 }' | xargs kill"); @@ -1935,4 +1939,4 @@ function squid_do_xmlrpc_sync($sync_to_ip, $username, $password) { } -?>
\ No newline at end of file +?> |