Update csf.py

fix error on Ubuntu where regex replaces all Iptables lines

*Error* The path to iptables is either not set or incorrect for IPTABLES [] in /etc/csf/csf.conf at /usr/local/csf/lib/ConfigServer/Sanity.pm line 36.
Compilation failed in require at /usr/sbin/csf line 22.
BEGIN failed--compilation aborted at /usr/sbin/csf line 22.
This commit is contained in:
spyngamerman
2019-10-10 11:57:51 -04:00
committed by GitHub
parent 8eae731cc1
commit 164c6cddd4

View File

@@ -277,8 +277,6 @@ class CSF(multi.Thread):
writeToConf.writelines('POP3D_LOG = "/var/log/mail.log"\n')
elif items.find('IMAPD_LOG =') > -1 and items.find('=') > -1 and (items[0] != '#'):
writeToConf.writelines('IMAPD_LOG = "/var/log/mail.log"\n')
elif items.find('IPTABLES_LOG =') > -1 and items.find('=') > -1 and (items[0] != '#'):
writeToConf.writelines('IPTABLES_LOG = "/var/log/kern.log"\n')
elif items.find('SYSLOG_LOG =') > -1 and items.find('=') > -1 and (items[0] != '#'):
writeToConf.writelines('SYSLOG_LOG = "/var/log/syslog"\n')
else: