From b873ffa9989d0c0eef5fc1f2af6a3ca36a199f36 Mon Sep 17 00:00:00 2001 From: Richard Adams Date: Tue, 31 Jul 2012 10:10:56 -0300 Subject: Change the way we keep only one going and no more. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test and reboot tested. Only 1 starts up. Theoretically, it should not even start 1, but if I set it to greater than 1, 2 opens up and remains open. I guess it is preloading the variables? Just have to watch the behavior and see if that ever changes.  --- config/squid-reverse/proxy_monitor.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'config/squid-reverse') diff --git a/config/squid-reverse/proxy_monitor.sh b/config/squid-reverse/proxy_monitor.sh index edf6b68e..17de3997 100644 --- a/config/squid-reverse/proxy_monitor.sh +++ b/config/squid-reverse/proxy_monitor.sh @@ -27,8 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -IS_RUNNING=`ps awx |grep -c "[p]roxy_monitor.sh"` -if [ $IS_RUNNING -gt 1 ]; then +if [ `pgrep -f "proxy_monitor.sh"|wc -l` -ge 1 ]; then exit 0 fi -- cgit v1.2.3