mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-21 22:40:22 +02:00
cagefs exclude users
This commit is contained in:
@@ -661,6 +661,9 @@ class preFlightsChecks:
|
||||
command = 'chmod 600 /usr/local/CyberCP/plogical/adminPass.py'
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
command = 'chmod 600 /etc/cagefs/exclude/cyberpanelexclude'
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
command = "find /usr/local/CyberCP/ -name '*.pyc' -delete"
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
@@ -2169,6 +2172,22 @@ service_port = 9000
|
||||
writeToFile.write(content)
|
||||
writeToFile.close()
|
||||
|
||||
command = 'mkdir -p /etc/cagefs/exclude'
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
content = """cyberpanel
|
||||
docker
|
||||
ftpuser
|
||||
lscpd
|
||||
opendkim
|
||||
pdns
|
||||
vmail
|
||||
"""
|
||||
|
||||
writeToFile = open('/etc/cagefs/exclude/cyberpanelexclude', 'w')
|
||||
writeToFile.write(content)
|
||||
writeToFile.close()
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@@ -1678,6 +1678,9 @@ CSRF_COOKIE_SECURE = True
|
||||
command = 'chmod 600 /usr/local/CyberCP/plogical/adminPass.py'
|
||||
Upgrade.executioner(command, 0)
|
||||
|
||||
command = 'chmod 600 /etc/cagefs/exclude/cyberpanelexclude'
|
||||
Upgrade.executioner(command, 0)
|
||||
|
||||
command = "find /usr/local/CyberCP/ -name '*.pyc' -delete"
|
||||
Upgrade.executioner(command, 0)
|
||||
|
||||
@@ -2032,6 +2035,23 @@ service_port = 9000
|
||||
writeToFile.write(content)
|
||||
writeToFile.close()
|
||||
|
||||
|
||||
command = 'mkdir -p /etc/cagefs/exclude'
|
||||
Upgrade.executioner(command, command, 0)
|
||||
|
||||
content = """cyberpanel
|
||||
docker
|
||||
ftpuser
|
||||
lscpd
|
||||
opendkim
|
||||
pdns
|
||||
vmail
|
||||
"""
|
||||
|
||||
writeToFile = open('/etc/cagefs/exclude/cyberpanelexclude', 'w')
|
||||
writeToFile.write(content)
|
||||
writeToFile.close()
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user