aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/squid/proxy_monitor.sh6
-rw-r--r--packages/squid/squid.inc4
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/squid/proxy_monitor.sh b/packages/squid/proxy_monitor.sh
index 05584534..fab2ee54 100644
--- a/packages/squid/proxy_monitor.sh
+++ b/packages/squid/proxy_monitor.sh
@@ -38,10 +38,10 @@ fi
# Sleep 5 seconds on startup not to mangle with existing boot scripts.
sleep 5
-# Squid monitor 1.1
+# Squid monitor 1.2
while [ /bin/true ]; do
if [ ! -f /var/run/squid_alarm ]; then
- NUM_PROCS=`ps auxw | grep "[(]squid) -D"|awk '{print $2}'| wc -l | awk '{ print $1 }'`
+ NUM_PROCS=`ps auxw | grep "[s]quid -D"|awk '{print $2}'| wc -l | awk '{ print $1 }'`
if [ $NUM_PROCS -lt 1 ]; then
# squid is down
echo "Squid has exited. Reconfiguring filter." | \
@@ -54,7 +54,7 @@ while [ /bin/true ]; do
touch /var/run/squid_alarm
fi
fi
- NUM_PROCS=`ps auxw | grep "[(]squid) -D"|awk '{print $2}'| wc -l | awk '{ print $1 }'`
+ NUM_PROCS=`ps auxw | grep "[s]quid -D"|awk '{print $2}'| wc -l | awk '{ print $1 }'`
if [ $NUM_PROCS -gt 0 ]; then
if [ -f /var/run/squid_alarm ]; then
echo "Squid has resumed. Reconfiguring filter." | \
diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc
index 25078785..c7ec429a 100644
--- a/packages/squid/squid.inc
+++ b/packages/squid/squid.inc
@@ -174,7 +174,7 @@ function squid_install_command() {
$rc = array();
$rc['file'] = 'squid.sh';
$rc['start'] = <<<EOD
-if [ -z "`ps auxw | grep \"[(]squid) -D\"|awk '{print $2}'`" ];then
+if [ -z "`ps auxw | grep "[s]quid -D"|awk '{print $2}'`" ];then
/usr/local/sbin/squid -D
fi
@@ -188,7 +188,7 @@ killall pinger 2>/dev/null
EOD;
$rc['restart'] = <<<EOD
-if [ -z "`ps auxw | grep \"[(]squid) -D\"|awk '{print $2}'`" ];then
+if [ -z "`ps auxw | grep "[s]quid -D"|awk '{print $2}'`" ];then
/usr/local/sbin/squid -D
else
/usr/local/sbin/squid -k reconfigure