aboutsummaryrefslogtreecommitdiffstats
path: root/config/sarg/sarg.inc
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2012-05-04 18:18:08 -0300
committermarcelloc <marcellocoutinho@gmail.com>2012-05-04 18:18:08 -0300
commit6d1ec508780b4aa302bb18a986b230a3f16c4b54 (patch)
treead25beee640276025057541eca8975e19f333026 /config/sarg/sarg.inc
parent966c44e63d204906efaefebc66c9611f910486cb (diff)
downloadpfsense-packages-6d1ec508780b4aa302bb18a986b230a3f16c4b54.tar.gz
pfsense-packages-6d1ec508780b4aa302bb18a986b230a3f16c4b54.tar.bz2
pfsense-packages-6d1ec508780b4aa302bb18a986b230a3f16c4b54.zip
sarg - more fixes to squidguard reports and rotate
Diffstat (limited to 'config/sarg/sarg.inc')
-rw-r--r--config/sarg/sarg.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/sarg/sarg.inc b/config/sarg/sarg.inc
index 48f79917..e650efd6 100644
--- a/config/sarg/sarg.inc
+++ b/config/sarg/sarg.inc
@@ -103,17 +103,16 @@ function run_sarg($id=-1) {
if ($action =="both" || $action=="rotate"){
log_error('executing squidguard log rotate after sarg.');
log_rotate($sarg_proxy['squidguard_block_log']);
- log_error('executing squid log rotate after sarg.');
file_put_contents($sarg_proxy['squidguard_block_log'],"",LOCK_EX);
chown($sarg_proxy['squidguard_block_log'],'proxy');
chgrp($sarg_proxy['squidguard_block_log'],'proxy');
- mwexec('squid -k reconfigure');
+ mwexec('/usr/local/sbin/squid -k reconfigure');
}
- break;
+ #leave this case without break to run squid rotate too.
case "squid":
if ($action =="both" || $action=="rotate"){
log_error('executing squid log rotate after sarg.');
- mwexec('squid -k rotate');
+ mwexec('/usr/local/sbin/squid -k rotate');
}
if ($action =="both" || $action=="restart"){
if (file_exists($sarg_proxy['squid_rc']))
@@ -140,7 +139,6 @@ function sync_package_sarg() {
if (!preg_match("/\w+/",$_POST['__csrf_magic']))
return;
}
-
$update_conf=0;
#mount filesystem writeable
conf_mount_rw();
@@ -166,6 +164,7 @@ function sync_package_sarg() {
'ldap_port'=> '389',
'ntlm_user_format'=>'domainname+username');
$sarguser=$config['installedpackages']['sarguser']['config'][0];
+ $access_log=$sarg['proxy_server'];
switch ($sarg['proxy_server']){
case 'dansguardian':
$access_log= $sarg_proxy['dansguardian_log'];
@@ -253,6 +252,7 @@ function sync_package_sarg() {
if (!is_dir($dir))
mkdir ($dir,0755,true);
+ //log_error($_POST['__csrf_magic']." sarg log:". $access_log);
#create sarg config files
include("/usr/local/pkg/sarg.template");
file_put_contents("/usr/local/etc/sarg/sarg.conf", $sg, LOCK_EX);