diff options
author | D. V. Serg <dvserg@pfsense.org> | 2008-04-01 12:10:44 +0000 |
---|---|---|
committer | D. V. Serg <dvserg@pfsense.org> | 2008-04-01 12:10:44 +0000 |
commit | f798eac369a6c50dad59c68a7ec4ca2c358b8a8f (patch) | |
tree | 061fb90db4174030a16facbc30101faaabff8070 /packages | |
parent | d5b3298fe82661b0c4e5b7eb645bc850a0a19e6f (diff) | |
download | pfsense-packages-f798eac369a6c50dad59c68a7ec4ca2c358b8a8f.tar.gz pfsense-packages-f798eac369a6c50dad59c68a7ec4ca2c358b8a8f.tar.bz2 pfsense-packages-f798eac369a6c50dad59c68a7ec4ca2c358b8a8f.zip |
Update resync proc (configuration squid for lightsquid).
Diffstat (limited to 'packages')
-rw-r--r-- | packages/lightsquid/lightsquid.inc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/lightsquid/lightsquid.inc b/packages/lightsquid/lightsquid.inc index fbdd1dec..6ae3de79 100644 --- a/packages/lightsquid/lightsquid.inc +++ b/packages/lightsquid/lightsquid.inc @@ -33,6 +33,7 @@ require_once('pfsense-utils.inc'); require_once('pkg-utils.inc'); require_once('filter.inc'); require_once('service-utils.inc'); +require_once('squid.inc'); define ('CMD_PKGDELETE', 'pkg_delete lightsquid-1.7.1'); @@ -210,7 +211,7 @@ function lightsquid_resync() { } // set shedule - refresh data job - if ($tm) { + if ($tm) { $on = false; $opt = array("*", "*", "*", "*", "*", "root", CRONTAB_LS_TEMPLATE . " today"); switch($tm) { @@ -230,11 +231,11 @@ function lightsquid_resync() { case 'lhp_24h': $on = true; $opt[0]= "0"; $opt[1]= "0"; $opt[2]= "*/24"; break; } ls_setup_cron("lightsquid_parser", $opt, CRONTAB_LS_JOBKEY, $on); - } else + } else ls_setup_cron("lightsquid_parser", "", "", false); // set shedule - squid rotate - if ($tm_squid) { + if ($tm_squid) { $on = false; $opt = array("0", "0", "*", "*", "*", "root", CRONTAB_SQUID_TEMPLATE); switch($tm_squid) { @@ -261,8 +262,16 @@ function lightsquid_resync() { case 'lsr_w7': $on = true; $opt[4]= "*/1"; break; } ls_setup_cron("lightsquid_squid_rotate", $opt, CRONTAB_SQUID_JOBKEY, $on); - } else + } else ls_setup_cron("lightsquid_squid_rotate", "", "", false); + + // update squid conf + if (isset($config['installedpackages']['squid']['config'][0])) { + $config['installedpackages']['squid']['config'][0]['log_enabled'] = 'on'; + $config['installedpackages']['squid']['config'][0]['log_dir'] = LS_SQUIDLOGPATH; + write_config(); + squid_resync(); + } } if ($_POST['Submit'] === 'Refresh now') refresh_now(); |