mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-24 07:20:44 +01:00
run commands to update logformat for existing vhosts
This commit is contained in:
@@ -2055,6 +2055,15 @@ vmail
|
||||
except:
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def runSomeImportantBash():
|
||||
|
||||
command = """sed -i "s|^LogFormat.*|LogFormat '%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"' combined|g" /usr/local/lsws/conf/httpd.conf"""
|
||||
subprocess.call(command, shell=True)
|
||||
|
||||
command = """find /usr/local/lsws/conf/vhosts/ -type f -name 'vhost.conf' -exec sed -i "s/.*CustomLog.*/ LogFormat '%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"' combined\n&/g" {} \;"""
|
||||
subprocess.call(command, shell=True)
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user