diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2007-01-17 13:14:18 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2007-01-17 13:14:18 +0000 |
commit | 4ee0d459c2794313454eddc9188c071dbb8bcebf (patch) | |
tree | 54bb489a2c5d9b6d03f802916934e069786350ca /packages/squid/squid.inc | |
parent | 64645bf45f103030c7da007f204be926705d8c8a (diff) | |
download | pfsense-packages-4ee0d459c2794313454eddc9188c071dbb8bcebf.tar.gz pfsense-packages-4ee0d459c2794313454eddc9188c071dbb8bcebf.tar.bz2 pfsense-packages-4ee0d459c2794313454eddc9188c071dbb8bcebf.zip |
Attempt to fix double startup error, this would result in squid starting twice and not being able to bind to the http port.
Diffstat (limited to 'packages/squid/squid.inc')
-rw-r--r-- | packages/squid/squid.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc index d5f2c37d..25078785 100644 --- a/packages/squid/squid.inc +++ b/packages/squid/squid.inc @@ -173,7 +173,12 @@ function squid_install_command() { exec("/bin/rm /usr/local/etc/rc.d/squid"); $rc = array(); $rc['file'] = 'squid.sh'; - $rc['start'] = '/usr/local/sbin/squid -D'; + $rc['start'] = <<<EOD +if [ -z "`ps auxw | grep \"[(]squid) -D\"|awk '{print $2}'`" ];then + /usr/local/sbin/squid -D +fi + +EOD; $rc['stop'] = <<<EOD /usr/local/sbin/squid -k shutdown # Just to be sure... @@ -183,7 +188,7 @@ killall pinger 2>/dev/null EOD; $rc['restart'] = <<<EOD -if [ -z "`pgrep squid`" ]; then +if [ -z "`ps auxw | grep \"[(]squid) -D\"|awk '{print $2}'`" ];then /usr/local/sbin/squid -D else /usr/local/sbin/squid -k reconfigure |