diff options
author | jim-p <jimp@pfsense.org> | 2010-06-23 15:38:36 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-06-23 15:38:36 -0400 |
commit | 08ad92c2cf2663e16df9ecf2a6ffb95bdf5cf63d (patch) | |
tree | 2f551867fb26c6992128a765fcb31fe4e9e0c3e8 /config/squid | |
parent | f29f99c99930e4654a982ecd0e298af8521be36e (diff) | |
download | pfsense-packages-08ad92c2cf2663e16df9ecf2a6ffb95bdf5cf63d.tar.gz pfsense-packages-08ad92c2cf2663e16df9ecf2a6ffb95bdf5cf63d.tar.bz2 pfsense-packages-08ad92c2cf2663e16df9ecf2a6ffb95bdf5cf63d.zip |
Sleep dynamically based on whether or not squid is running at the time, rather than waiting constantly and slowing down the boot time.
Diffstat (limited to 'config/squid')
-rw-r--r-- | config/squid/squid.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 752d8376..54150805 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -1120,14 +1120,17 @@ function squid_resync() { if (!is_service_running('squid')) { log_error("Starting Squid"); - mwexec_bg("/usr/local/sbin/squid -D"); + mwexec("/usr/local/sbin/squid -D"); } else { log_error("Reloading Squid for configuration sync"); mwexec("/usr/local/sbin/squid -k reconfigure"); } // Sleep for a couple seconds to give squid a chance to fire up fully. - sleep(5); + for ($i=0; $i < 10; $i++) { + if (!is_service_running('squid')) + sleep(1); + } filter_configure(); conf_mount_ro(); } |