aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-10-01 22:48:59 +0200
committerdoktornotor <notordoktor@gmail.com>2015-10-01 22:48:59 +0200
commitaa8c01713625a51fec2d8cc6d12d9a4c4f5ce94d (patch)
tree12bd4fcd335e6b7bebea54c525d5776c786138df /config/squid3
parent281897d2d9cbcdccf5f10a77f2bd81bebc46e6f1 (diff)
downloadpfsense-packages-aa8c01713625a51fec2d8cc6d12d9a4c4f5ce94d.tar.gz
pfsense-packages-aa8c01713625a51fec2d8cc6d12d9a4c4f5ce94d.tar.bz2
pfsense-packages-aa8c01713625a51fec2d8cc6d12d9a4c4f5ce94d.zip
Remove useless buggy /etc/rc.conf.local crap
Adding to the file was broken -- when run multiple times, it added a separate ="YES" line to the file. Moreover, the _enable variable is being patched to default to YES in individual rc scripts, so this junk is just not needed. Leaving the squid_deinstall_command() stuff in here for now, hopefully most users will get the "settings" removed and never added back.
Diffstat (limited to 'config/squid3')
-rwxr-xr-xconfig/squid3/34/squid.inc27
1 files changed, 1 insertions, 26 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index ed218409..acc029c3 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -1590,23 +1590,7 @@ adaptation_access service_avi_resp allow all
EOF;
- // check if clamav is enabled in rc.conf.local
- // XXX: This whole thing sucks and should be redone to install/enable services in pfSense way
- if (file_exists("/etc/rc.conf.local")) {
- $rc_old_file = file("/etc/rc.conf.local");
- foreach ($rc_old_file as $rc_line) {
- if (preg_match("/^clamav_clamd_enable/", $rc_line, $matches)) {
- $rc_file .= $matches[1] . '="YES"' . "\n";
- ${$matches[1]} = "ok";
- } else {
- $rc_file .= $rc_line;
- }
- }
- }
- if (!isset($clamav_clamd_enable)) {
- $rc_file .= 'clamav_clamd_enable="YES"' . "\n";
- }
- file_put_contents("/etc/rc.conf.local", $rc_file, LOCK_EX);
+ // check clamav user
squid_check_clamav_user('clamav');
// patch sample files to pfsense dirs
// squidclamav.conf
@@ -2341,15 +2325,6 @@ function squid_restart_antivirus() {
}
}
- // check if clamav is enabled in rc.conf.local
- // XXX: This whole thing sucks and should be redone to install/enable services in pfSense way
- if (file_exists("/etc/rc.conf.local")) {
- log_error("Removing antivirus services from /etc/rc.conf.local...");
- $sample_file = file_get_contents("/etc/rc.conf.local");
- $rcconf_local_m[0] = "@clamav_clamd_enable(.*)\n@";
- $rcconf_local_r[0] = "";
- file_put_contents("/etc/rc.conf.local", preg_replace($rcconf_local_m, $rcconf_local_r, $sample_file), LOCK_EX);
- }
// check c-icap rcfile
if (is_process_running("c-icap")) {
log_error("Stopping and disabling C-ICAP...");