mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-06-27 16:08:59 +02:00
Merge branch 'v2.3.2-dev' of https://github.com/usmannasir/cyberpanel into v2.3.2-dev
This commit is contained in:
@@ -2051,6 +2051,26 @@ milter_default_action = accept
|
||||
logging.InstallLog.writeToFile('[ERROR] ' + str(msg) + " [enableDisableEmail]")
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
def fixSudoers():
|
||||
try:
|
||||
distroPath = '/etc/lsb-release'
|
||||
|
||||
if not os.path.exists(distroPath):
|
||||
fileName = '/etc/sudoers'
|
||||
data = open(fileName, 'r').readlines()
|
||||
|
||||
writeDataToFile = open(fileName, 'w')
|
||||
for line in data:
|
||||
if line.find("root") > -1 and line.find("ALL=(ALL)") > -1 and line[0] != '#':
|
||||
writeDataToFile.writelines('root ALL=(ALL:ALL) ALL\n')
|
||||
else:
|
||||
writeDataToFile.write(line)
|
||||
writeDataToFile.close()
|
||||
|
||||
except IOError as err:
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def setUpFirstAccount():
|
||||
try:
|
||||
@@ -2299,6 +2319,7 @@ def main():
|
||||
checks.setupPHPAndComposer()
|
||||
checks.fix_selinux_issue()
|
||||
checks.install_psmisc()
|
||||
checks.fixSudoers()
|
||||
|
||||
if args.postfix is None:
|
||||
checks.install_postfix_dovecot()
|
||||
|
||||
@@ -246,6 +246,8 @@ class Upgrade:
|
||||
for items in data:
|
||||
if items.find("wheel") > -1 and items.find("ALL=(ALL)"):
|
||||
continue
|
||||
elif items.find("root") > -1 and items.find("ALL=(ALL)") > -1 and items[0] != '#':
|
||||
writeToFile.writelines('root ALL=(ALL:ALL) ALL\n')
|
||||
else:
|
||||
writeToFile.writelines(items)
|
||||
|
||||
|
||||
@@ -36,18 +36,6 @@ accesslog $VH_ROOT/logs/$VH_NAME.access_log {
|
||||
compressArchive 1
|
||||
}
|
||||
|
||||
errorpage 403 {
|
||||
url 403.html
|
||||
}
|
||||
|
||||
errorpage 404 {
|
||||
url 404.html
|
||||
}
|
||||
|
||||
errorpage 500 {
|
||||
url 500.html
|
||||
}
|
||||
|
||||
scripthandler {
|
||||
add lsapi:{virtualHostUser} php
|
||||
}
|
||||
@@ -145,18 +133,6 @@ module cache {
|
||||
storagePath /usr/local/lsws/cachedata/$VH_NAME
|
||||
}
|
||||
|
||||
errorpage 403 {
|
||||
url 403.html
|
||||
}
|
||||
|
||||
errorpage 404 {
|
||||
url 404.html
|
||||
}
|
||||
|
||||
errorpage 500 {
|
||||
url 500.html
|
||||
}
|
||||
|
||||
scripthandler {
|
||||
add lsapi:{externalApp} php
|
||||
}
|
||||
@@ -228,6 +204,7 @@ context /.well-known/acme-challenge {
|
||||
ServerAdmin {administratorEmail}
|
||||
SuexecUserGroup {externalApp} {externalApp}
|
||||
DocumentRoot {path}
|
||||
Alias /.well-known/acme-challenge /usr/local/lsws/Example/html/.well-known/acme-challenge
|
||||
CustomLog /home/{masterDomain}/logs/{masterDomain}.access_log combined
|
||||
AddHandler application/x-httpd-php{php} .php .php7 .phtml
|
||||
<IfModule LiteSpeed>
|
||||
|
||||
Reference in New Issue
Block a user