diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2012-05-02 19:08:05 -0300 |
---|---|---|
committer | marcelloc <marcellocoutinho@gmail.com> | 2012-05-02 19:08:05 -0300 |
commit | 5f2c48fd8487d5fd1d8cd6445007900e3d4042df (patch) | |
tree | 61dfcb54927addaee6d607be15c0dc178c6b7086 /config/dansguardian/dansguardian.inc | |
parent | b18a68f5add6ca6af5fb2f96732adf264e6c09f4 (diff) | |
download | pfsense-packages-5f2c48fd8487d5fd1d8cd6445007900e3d4042df.tar.gz pfsense-packages-5f2c48fd8487d5fd1d8cd6445007900e3d4042df.tar.bz2 pfsense-packages-5f2c48fd8487d5fd1d8cd6445007900e3d4042df.zip |
squid3 - reduce squid startup time and include boot process check
Diffstat (limited to 'config/dansguardian/dansguardian.inc')
-rwxr-xr-x | config/dansguardian/dansguardian.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc index 72623b4f..56acfc5e 100755 --- a/config/dansguardian/dansguardian.inc +++ b/config/dansguardian/dansguardian.inc @@ -87,6 +87,8 @@ function sync_package_dansguardian() { # detect boot process if (is_array($_POST)){ if (preg_match("/\w+/",$_POST['__csrf_magic'])) + unset($boot_process); + else $boot_process="on"; } @@ -1011,7 +1013,7 @@ EOF; } file_put_contents($script, $new_clamav_startup, LOCK_EX); chmod ($script,0755); - if (file_exists('/var/run/dansguardian.pid') && is_process_running('clamd') && $botting){ + if (file_exists('/var/run/dansguardian.pid') && is_process_running('clamd') && !isset($boot_process)){ log_error('Stopping clamav-clamd'); mwexec("$script stop"); } @@ -1033,7 +1035,7 @@ EOF; chmod ($script,0755); if (is_process_running('dansguardian')){ #prevent multiple reloads during boot process - if ($botting){ + if (!isset($boot_process)){ log_error('Reloading Dansguardian'); exec("/usr/local/sbin/dansguardian -r"); } @@ -1062,7 +1064,7 @@ EOF; conf_mount_ro(); #avoid sync during boot process - if ($botting){ + if (!isset($boot_process)){ $synconchanges = $config['installedpackages']['dansguardiansync']['config'][0]['synconchanges']; if(!$synconchanges && !$syncondbchanges) return; |