Events for Firewall and Bug fixes

This commit is contained in:
usmannasir
2018-10-12 18:18:10 +05:00
parent ec1406ec1f
commit 4bb20ceade
56 changed files with 4337 additions and 2606 deletions

View File

@@ -687,7 +687,7 @@ class preFlightsChecks:
count = 0
while (1):
command = "wget http://cyberpanel.net/CyberPanelTemp.tar.gz"
command = "wget http://cyberpanel.net/CyberPanel.1.7.2.tar.gz"
#command = "wget http://cyberpanel.net/CyberPanelTemp.tar.gz"
res = subprocess.call(shlex.split(command))
@@ -707,7 +707,7 @@ class preFlightsChecks:
count = 0
while(1):
command = "tar zxf CyberPanelTemp.tar.gz"
command = "tar zxf CyberPanel.1.7.2.tar.gz"
#command = "tar zxf CyberPanelTemp.tar.gz"
res = subprocess.call(shlex.split(command))
@@ -1035,7 +1035,7 @@ class preFlightsChecks:
os.mkdir('/usr/local/lscp/cyberpanel/phpmyadmin/tmp')
command = 'chown -R nobody:nobody /usr/local/lscp/cyberpanel/phpmyadmin'
command = 'chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/phpmyadmin'
subprocess.call(shlex.split(command))
except OSError, msg:
@@ -1851,7 +1851,7 @@ class preFlightsChecks:
count = 0
while(1):
command = 'chown -R nobody:nobody /usr/local/lscp/cyberpanel/'
command = 'chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/'
cmd = shlex.split(command)
res = subprocess.call(cmd)
@@ -1963,7 +1963,7 @@ class preFlightsChecks:
while(1):
command = 'chown -R nobody:nobody .'
command = 'chown -R lscpd:lscpd .'
cmd = shlex.split(command)
res = subprocess.call(cmd)
@@ -3017,4 +3017,4 @@ def main():
if __name__ == "__main__":
main()
main()

View File

@@ -1043,29 +1043,7 @@ class InstallCyberPanel:
while(1):
command = 'tar zxf openlitespeed.tar.gz'
cmd = shlex.split(command)
res = subprocess.call(cmd)
if res == 1:
count = count + 1
InstallCyberPanel.stdOut("Trying to extract LSCPD, trying again, try number: " + str(count))
if count == 3:
logging.InstallLog.writeToFile("Failed to extract LSCPD, exiting installer! [installLSCPD]")
InstallCyberPanel.stdOut("Installation failed, consult: /var/log/installLogs.txt")
os._exit(0)
else:
logging.InstallLog.writeToFile("LSCPD successfully extracted!")
InstallCyberPanel.stdOut("LSCPD successfully extracted!")
break
os.chdir("openlitespeed")
count = 0
while(1):
command = './configure --with-lscpd --prefix=/usr/local/lscp'
command = 'tar zxf lscp.tar.gz -C /usr/local/'
cmd = shlex.split(command)
res = subprocess.call(cmd)
@@ -1081,50 +1059,6 @@ class InstallCyberPanel:
InstallCyberPanel.stdOut("LSCPD successfully extracted!")
break
count = 0
while(1):
command = 'make'
cmd = shlex.split(command)
res = subprocess.call(cmd)
if res == 1:
count = count + 1
InstallCyberPanel.stdOut("Trying to compile LSCPD, trying again, try number: " + str(count))
if count == 3:
logging.InstallLog.writeToFile("Failed to compile LSCPD, exiting installer! [installLSCPD]")
InstallCyberPanel.stdOut("Installation failed, consult: /var/log/installLogs.txt")
os._exit(0)
else:
logging.InstallLog.writeToFile("LSCPD successfully complied!")
InstallCyberPanel.stdOut("LSCPD successfully compiled!")
break
count = 0
while(1):
command = 'make install'
cmd = shlex.split(command)
res = subprocess.call(cmd)
if res == 1:
count = count + 1
InstallCyberPanel.stdOut("Trying to compile LSCPD, trying again, try number: " + str(count))
if count == 3:
logging.InstallLog.writeToFile("Failed to compile LSCPD, exiting installer! [installLSCPD]")
InstallCyberPanel.stdOut("Installation failed, consult: /var/log/installLogs.txt")
os._exit(0)
else:
logging.InstallLog.writeToFile("LSCPD successfully complied!")
InstallCyberPanel.stdOut("LSCPD successfully compiled!")
break
count = 0
while(1):
@@ -1149,11 +1083,27 @@ class InstallCyberPanel:
except:
pass
command = 'adduser lscpd -M -d /usr/local/lscp'
cmd = shlex.split(command)
res = subprocess.call(cmd)
command = 'groupadd lscpd'
cmd = shlex.split(command)
res = subprocess.call(cmd)
command = 'usermod -a -G lscpd lscpd'
cmd = shlex.split(command)
res = subprocess.call(cmd)
command = 'usermod -a -G lsadm lscpd'
cmd = shlex.split(command)
res = subprocess.call(cmd)
os.mkdir('/usr/local/lscp/cyberpanel')
logging.InstallLog.writeToFile("LSCPD successfully installed!")
InstallCyberPanel.stdOut("LSCPD successfully installed!")
except OSError, msg:
logging.InstallLog.writeToFile(str(msg) + " [installLSCPD]")
return 0

BIN
install/lscp.tar.gz Normal file

Binary file not shown.