refactor installation

This commit is contained in:
Usman Nasir
2019-11-13 16:13:52 +05:00
parent d5f7918de2
commit aa327d0e4d
2 changed files with 293 additions and 1528 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -39,36 +39,26 @@ class InstallCyberPanel:
else: else:
command = 'yum install -y openlitespeed' command = 'yum install -y openlitespeed'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install LiteSpeed.',
1, 1, os.EX_OSERR)
else: else:
try: try:
try: try:
command = 'groupadd nobody' command = 'groupadd nobody'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'groupadd nobody',
1, 0, os.EX_OSERR)
except: except:
pass pass
try: try:
command = 'usermod -a -G nobody nobody' command = 'usermod -a -G nobody nobody'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'groupadd nobody',
1, 0, os.EX_OSERR)
except: except:
pass pass
command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3.5-ent-x86_64-linux.tar.gz' command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3.5-ent-x86_64-linux.tar.gz'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install LiteSpeed Webserver Enterprise.',
1, 1, os.EX_OSERR)
command = 'tar zxf lsws-5.3.5-ent-x86_64-linux.tar.gz' command = 'tar zxf lsws-5.3.5-ent-x86_64-linux.tar.gz'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install LiteSpeed Webserver Enterprise.',
1, 1, os.EX_OSERR)
writeSerial = open('lsws-5.3.5/serial.no', 'w') writeSerial = open('lsws-5.3.5/serial.no', 'w')
writeSerial.writelines(self.serial) writeSerial.writelines(self.serial)
@@ -80,19 +70,13 @@ class InstallCyberPanel:
os.chdir('lsws-5.3.5') os.chdir('lsws-5.3.5')
command = 'chmod +x install.sh' command = 'chmod +x install.sh'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install LiteSpeed Webserver Enterprise.',
1, 1, os.EX_OSERR)
command = 'chmod +x functions.sh' command = 'chmod +x functions.sh'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install LiteSpeed Webserver Enterprise.',
1, 1, os.EX_OSERR)
command = './install.sh' command = './install.sh'
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install LiteSpeed Webserver Enterprise.',
1, 1, os.EX_OSERR)
os.chdir(self.cwd) os.chdir(self.cwd)
confPath = '/usr/local/lsws/conf/' confPath = '/usr/local/lsws/conf/'
@@ -101,9 +85,7 @@ class InstallCyberPanel:
shutil.copy('litespeed/httpd.conf', confPath) shutil.copy('litespeed/httpd.conf', confPath)
command = 'chown -R lsadm:lsadm ' + confPath command = 'chown -R lsadm:lsadm ' + confPath
install.preFlightsChecks.call(command, self.distro, '[installLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'Install LiteSpeed Webserver Enterprise.',
1, 0, os.EX_OSERR)
except OSError, msg: except OSError, msg:
logging.InstallLog.writeToFile(str(msg) + " [installLiteSpeed]") logging.InstallLog.writeToFile(str(msg) + " [installLiteSpeed]")
@@ -116,9 +98,7 @@ class InstallCyberPanel:
def reStartLiteSpeed(self): def reStartLiteSpeed(self):
command = self.server_root_path+"bin/lswsctrl restart" command = self.server_root_path+"bin/lswsctrl restart"
install.preFlightsChecks.call(command, self.distro, '[reStartLiteSpeed]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'Restart LiteSpeed WebServer',
1, 0, os.EX_OSERR)
def fix_ols_configs(self): def fix_ols_configs(self):
try: try:
@@ -170,51 +150,6 @@ class InstallCyberPanel:
return self.reStartLiteSpeed() return self.reStartLiteSpeed()
def setupFileManager(self):
if self.ent == 0:
try:
InstallCyberPanel.stdOut("Setting up Filemanager files..", 1)
os.chdir(self.cwd)
fileManagerPath = self.server_root_path+"Example/html/FileManager"
shutil.copytree("FileManager",fileManagerPath)
## remove unnecessary files
fileManagerPath = self.server_root_path + "Example/html/"
shutil.rmtree(fileManagerPath+"protected")
shutil.rmtree(fileManagerPath+"blocked")
os.remove(fileManagerPath+"phpinfo.php")
os.remove(fileManagerPath + "upload.html")
os.remove(fileManagerPath + "upload.php")
InstallCyberPanel.stdOut("Filemanager files are set!", 1)
except BaseException, msg:
logging.InstallLog.writeToFile(str(msg) + " [setupFileManager]")
else:
try:
InstallCyberPanel.stdOut("Setting up Filemanager files..", 1)
os.chdir(self.cwd)
fileManagerPath = self.server_root_path + "/FileManager"
shutil.copytree("FileManager", fileManagerPath)
## remove unnecessary files
command = 'chmod -R 777 ' + fileManagerPath
install.preFlightsChecks.call(command, self.distro, '[setupFileManager]',
'Change Filemanager permissions.',
1, 0, os.EX_OSERR)
InstallCyberPanel.stdOut("Filemanager files are set!", 1)
except BaseException, msg:
logging.InstallLog.writeToFile(str(msg) + " [setupFileManager]")
def installAllPHPVersions(self): def installAllPHPVersions(self):
if self.distro == ubuntu: if self.distro == ubuntu:
@@ -230,9 +165,7 @@ class InstallCyberPanel:
else: else:
command = 'yum -y groupinstall lsphp-all' command = 'yum -y groupinstall lsphp-all'
install.preFlightsChecks.call(command, self.distro, '[installAllPHPVersions]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install PHP ALL',
1, 1, os.EX_OSERR)
InstallCyberPanel.stdOut("LiteSpeed PHPs successfully installed!", 1) InstallCyberPanel.stdOut("LiteSpeed PHPs successfully installed!", 1)
@@ -243,18 +176,15 @@ class InstallCyberPanel:
'lsphp71-recode lsphp71-pspell lsphp71-process lsphp71-pgsql lsphp71-pear lsphp71-pdo lsphp71-opcache ' \ 'lsphp71-recode lsphp71-pspell lsphp71-process lsphp71-pgsql lsphp71-pear lsphp71-pdo lsphp71-opcache ' \
'lsphp71-odbc lsphp71-mysqlnd lsphp71-mcrypt lsphp71-mbstring lsphp71-ldap lsphp71-intl lsphp71-imap ' \ 'lsphp71-odbc lsphp71-mysqlnd lsphp71-mcrypt lsphp71-mbstring lsphp71-ldap lsphp71-intl lsphp71-imap ' \
'lsphp71-gmp lsphp71-gd lsphp71-enchant lsphp71-dba lsphp71-common lsphp71-bcmath -y' 'lsphp71-gmp lsphp71-gd lsphp71-enchant lsphp71-dba lsphp71-common lsphp71-bcmath -y'
install.preFlightsChecks.call(command, self.distro, '[installAllPHPVersions]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'Install PHP 71',
1, 0, os.EX_OSERR)
## only php 72 ## only php 72
command = 'yum install -y lsphp72 lsphp72-json lsphp72-xmlrpc lsphp72-xml lsphp72-tidy lsphp72-soap lsphp72-snmp ' \ command = 'yum install -y lsphp72 lsphp72-json lsphp72-xmlrpc lsphp72-xml lsphp72-tidy lsphp72-soap lsphp72-snmp ' \
'lsphp72-recode lsphp72-pspell lsphp72-process lsphp72-pgsql lsphp72-pear lsphp72-pdo lsphp72-opcache ' \ 'lsphp72-recode lsphp72-pspell lsphp72-process lsphp72-pgsql lsphp72-pear lsphp72-pdo lsphp72-opcache ' \
'lsphp72-odbc lsphp72-mysqlnd lsphp72-mcrypt lsphp72-mbstring lsphp72-ldap lsphp72-intl lsphp72-imap ' \ 'lsphp72-odbc lsphp72-mysqlnd lsphp72-mcrypt lsphp72-mbstring lsphp72-ldap lsphp72-intl lsphp72-imap ' \
'lsphp72-gmp lsphp72-gd lsphp72-enchant lsphp72-dba lsphp72-common lsphp72-bcmath' 'lsphp72-gmp lsphp72-gd lsphp72-enchant lsphp72-dba lsphp72-common lsphp72-bcmath'
install.preFlightsChecks.call(command, self.distro, '[installAllPHPVersions]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'Install PHP 72',
1, 0, os.EX_OSERR)
## only php 72 ## only php 72
command = 'yum install -y lsphp73 lsphp73-json lsphp73-xmlrpc lsphp73-xml lsphp73-tidy lsphp73-soap lsphp73-snmp ' \ command = 'yum install -y lsphp73 lsphp73-json lsphp73-xmlrpc lsphp73-xml lsphp73-tidy lsphp73-soap lsphp73-snmp ' \
@@ -262,9 +192,7 @@ class InstallCyberPanel:
'lsphp73-odbc lsphp73-mysqlnd lsphp73-mcrypt lsphp73-mbstring lsphp73-ldap lsphp73-intl lsphp73-imap ' \ 'lsphp73-odbc lsphp73-mysqlnd lsphp73-mcrypt lsphp73-mbstring lsphp73-ldap lsphp73-intl lsphp73-imap ' \
'lsphp73-gmp lsphp73-gd lsphp73-enchant lsphp73-dba lsphp73-common lsphp73-bcmath' 'lsphp73-gmp lsphp73-gd lsphp73-enchant lsphp73-dba lsphp73-common lsphp73-bcmath'
install.preFlightsChecks.call(command, self.distro, '[installAllPHPVersions]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'Install PHP 73',
1, 0, os.EX_OSERR)
def setup_mariadb_repo(self): def setup_mariadb_repo(self):
try: try:
@@ -297,9 +225,7 @@ class InstallCyberPanel:
else: else:
command = 'yum -y install mariadb-server' command = 'yum -y install mariadb-server'
install.preFlightsChecks.call(command, self.distro, '[installMySQL]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install MySQL',
1, 1, os.EX_OSERR)
## Fix configurations if two MYSQL are used ## Fix configurations if two MYSQL are used
@@ -326,56 +252,22 @@ class InstallCyberPanel:
## ##
count = 0 command = "mysql_install_db --user=mysql --datadir=/var/lib/mysql1"
install.preFlightsChecks.call(command, self.distro, '[installMySQL]',
'Install MySQL',
1, 1, os.EX_OSERR)
while (1):
command = "mysql_install_db --user=mysql --datadir=/var/lib/mysql1"
install.preFlightsChecks.call(command, self.distro, '[installMySQL]',
'Install MySQL',
1, 1, os.EX_OSERR)
## ##
count = 0 command = "systemctl start mysqld@1"
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
while (1): ##
command = "systemctl start mysqld@1"
res = subprocess.call(shlex.split(command))
if install.preFlightsChecks.resFailed(self.distro, res): command = "systemctl enable mysqld@1"
count = count + 1 install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
InstallCyberPanel.stdOut(
"Trying to start first MariaDB instance, trying again, try number: " + str(count))
if count == 3:
logging.InstallLog.writeToFile(
"Failed to start first MariaDB instance, exiting installer! [installMySQL]")
InstallCyberPanel.stdOut("Installation failed, consult: /var/log/installLogs.txt")
os._exit(0)
else:
logging.InstallLog.writeToFile("First MariaDB instance successfully started!")
InstallCyberPanel.stdOut("First MariaDB instance successfully started!")
break
count = 0
while (1):
command = "systemctl enable mysqld@1"
res = subprocess.call(shlex.split(command))
if install.preFlightsChecks.resFailed(self.distro, res):
count = count + 1
InstallCyberPanel.stdOut(
"Trying to enable first MariaDB instance to start and system restart, trying again, try number: " + str(
count))
if count == 3:
logging.InstallLog.writeToFile(
"Failed to enable first MariaDB instance to run at system restart, exiting installer! [installMySQL]")
InstallCyberPanel.stdOut("Installation failed, consult: /var/log/installLogs.txt")
os._exit(0)
else:
logging.InstallLog.writeToFile("First MariaDB instance successfully enabled at system restart!")
InstallCyberPanel.stdOut("First MariaDB instance successfully enabled at system restart!")
break
############## Start mariadb ###################### ############## Start mariadb ######################
@@ -389,17 +281,15 @@ class InstallCyberPanel:
passwordCMD = "use mysql;update user set password=PASSWORD('" + InstallCyberPanel.mysql_Root_password + "') where User='root';flush privileges;" passwordCMD = "use mysql;update user set password=PASSWORD('" + InstallCyberPanel.mysql_Root_password + "') where User='root';flush privileges;"
command = 'mysql -u root -e "' + passwordCMD + '"' command = 'mysql -u root -e "' + passwordCMD + '"'
install.preFlightsChecks.call(command, self.distro, '[changeMYSQLRootPassword]', 'MYSQL Root Password change.',
1, 1, os.EX_OSERR) install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
def startMariaDB(self): def startMariaDB(self):
############## Start mariadb ###################### ############## Start mariadb ######################
command = "systemctl start mysql" command = "systemctl start mysql"
install.preFlightsChecks.call(command, self.distro, '[startMariaDB]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Start MySQL',
1, 1, os.EX_OSERR)
############## Enable mariadb at system startup ###################### ############## Enable mariadb at system startup ######################
@@ -413,9 +303,7 @@ class InstallCyberPanel:
else: else:
command = "systemctl enable mariadb" command = "systemctl enable mariadb"
install.preFlightsChecks.call(command, self.distro, '[installMySQL]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Enable MySQL',
1, 0, os.EX_OSERR)
def fixMariaDB(self): def fixMariaDB(self):
self.stdOut("Setup MariaDB so it can support Cyberpanel's needs") self.stdOut("Setup MariaDB so it can support Cyberpanel's needs")
@@ -449,28 +337,20 @@ class InstallCyberPanel:
else: else:
command = "yum install -y pure-ftpd" command = "yum install -y pure-ftpd"
install.preFlightsChecks.call(command, self.distro, '[installPureFTPD]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install FTP',
1, 1, os.EX_OSERR)
####### Install pureftpd to system startup ####### Install pureftpd to system startup
command = "systemctl enable " + install.preFlightsChecks.pureFTPDServiceName(self.distro) command = "systemctl enable " + install.preFlightsChecks.pureFTPDServiceName(self.distro)
install.preFlightsChecks.call(command, self.distro, '[installPureFTPD]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install FTP',
1, 1, os.EX_OSERR)
###### FTP Groups and user settings settings ###### FTP Groups and user settings settings
command = 'groupadd -g 2001 ftpgroup' command = 'groupadd -g 2001 ftpgroup'
install.preFlightsChecks.call(command, self.distro, '[installPureFTPD]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install FTP',
1, 1, os.EX_OSERR)
command = 'useradd -u 2001 -s /bin/false -d /bin/null -c "pureftpd user" -g ftpgroup ftpuser' command = 'useradd -u 2001 -s /bin/false -d /bin/null -c "pureftpd user" -g ftpgroup ftpuser'
install.preFlightsChecks.call(command, self.distro, '[installPureFTPD]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install FTP',
1, 1, os.EX_OSERR)
def startPureFTPD(self): def startPureFTPD(self):
############## Start pureftpd ###################### ############## Start pureftpd ######################
@@ -478,9 +358,7 @@ class InstallCyberPanel:
command = 'systemctl start pure-ftpd-mysql' command = 'systemctl start pure-ftpd-mysql'
else: else:
command = 'systemctl start pure-ftpd' command = 'systemctl start pure-ftpd'
install.preFlightsChecks.call(command, self.distro, '[startPureFTPD]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Start FTP',
1, 0, os.EX_OSERR)
def installPureFTPDConfigurations(self, mysql): def installPureFTPDConfigurations(self, mysql):
try: try:
@@ -495,9 +373,7 @@ class InstallCyberPanel:
command = 'openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem' command = 'openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem'
install.preFlightsChecks.call(command, self.distro, '[installPureFTPDConfigurations]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'FTP Configurations',
1, 0, os.EX_OSERR)
os.chdir(self.cwd) os.chdir(self.cwd)
ftpdPath = "/etc/pure-ftpd" ftpdPath = "/etc/pure-ftpd"
@@ -538,9 +414,7 @@ class InstallCyberPanel:
if self.distro == ubuntu: if self.distro == ubuntu:
command = 'apt install pure-ftpd-mysql -y' command = 'apt install pure-ftpd-mysql -y'
install.preFlightsChecks.call(command, self.distro, '[installPureFTPDConfigurations]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'FTP Configurations',
1, 1, os.EX_OSERR)
if os.path.exists('/etc/pure-ftpd/db/mysql.conf'): if os.path.exists('/etc/pure-ftpd/db/mysql.conf'):
os.remove('/etc/pure-ftpd/db/mysql.conf') os.remove('/etc/pure-ftpd/db/mysql.conf')
@@ -552,9 +426,7 @@ class InstallCyberPanel:
subprocess.call(command, shell=True) subprocess.call(command, shell=True)
command = 'systemctl restart pure-ftpd-mysql.service' command = 'systemctl restart pure-ftpd-mysql.service'
install.preFlightsChecks.call(command, self.distro, '[installPureFTPDConfigurations]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'FTP Configurations',
1, 0, os.EX_OSERR)
InstallCyberPanel.stdOut("PureFTPD configured!", 1) InstallCyberPanel.stdOut("PureFTPD configured!", 1)
@@ -564,20 +436,14 @@ class InstallCyberPanel:
def installPowerDNS(self): def installPowerDNS(self):
try: try:
count = 0
if self.distro == ubuntu: if self.distro == ubuntu:
command = 'systemctl stop systemd-resolved' command = 'systemctl stop systemd-resolved'
res = subprocess.call(shlex.split(command)) install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
if res != 0:
InstallCyberPanel.stdOut('Unable to stop systemd.resolved, prohits install of PowerDNS, error #' +
str(res), 1, 1, os.EX_OSERR)
command = 'systemctl disable systemd-resolved.service' command = 'systemctl disable systemd-resolved.service'
res = subprocess.call(shlex.split(command)) install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
if res != 0:
InstallCyberPanel.stdOut(
'Unable to disable systemd.resolved, prohits install of PowerDNS, error #' +
str(res), 1, 1, os.EX_OSERR)
try: try:
os.rename('/etc/resolv.conf', 'etc/resolved.conf') os.rename('/etc/resolv.conf', 'etc/resolved.conf')
except OSError as e: except OSError as e:
@@ -588,7 +454,10 @@ class InstallCyberPanel:
os.remove('/etc/resolv.conf') os.remove('/etc/resolv.conf')
except OSError as e1: except OSError as e1:
InstallCyberPanel.stdOut("Unable to remove existing /etc/resolv.conf to install PowerDNS: " + InstallCyberPanel.stdOut("Unable to remove existing /etc/resolv.conf to install PowerDNS: " +
str(e1), 1, 1, os.EX_OSERR) str(e1), 1, 1, os.EX_OSERR)+
try: try:
f = open('/etc/resolv.conf', 'w') f = open('/etc/resolv.conf', 'w')
f.write('nameserver 8.8.8.8') f.write('nameserver 8.8.8.8')
@@ -600,15 +469,11 @@ class InstallCyberPanel:
if self.distro == centos: if self.distro == centos:
command = 'yum -y install epel-release' command = 'yum -y install epel-release'
install.preFlightsChecks.call(command, self.distro, '[installPowerDNS]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install PowerDNS',
1, 1, os.EX_OSERR)
command = 'curl -o /etc/yum.repos.d/powerdns-auth-42.repo ' \ command = 'curl -o /etc/yum.repos.d/powerdns-auth-42.repo ' \
'https://repo.powerdns.com/repo-files/centos-auth-42.repo' 'https://repo.powerdns.com/repo-files/centos-auth-42.repo'
install.preFlightsChecks.call(command, self.distro, '[installPowerDNS]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install PowerDNS',
1, 1, os.EX_OSERR)
if self.distro == ubuntu: if self.distro == ubuntu:
command = "DEBIAN_FRONTEND=noninteractive apt-get -y install pdns-server pdns-backend-mysql" command = "DEBIAN_FRONTEND=noninteractive apt-get -y install pdns-server pdns-backend-mysql"
@@ -617,9 +482,8 @@ class InstallCyberPanel:
else: else:
command = 'yum -y install pdns pdns-backend-mysql' command = 'yum -y install pdns pdns-backend-mysql'
install.preFlightsChecks.call(command, self.distro, '[installPowerDNS]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
'Install PowerDNS',
1, 1, os.EX_OSERR)
except BaseException, msg: except BaseException, msg:
logging.InstallLog.writeToFile(str(msg) + " [powerDNS]") logging.InstallLog.writeToFile(str(msg) + " [powerDNS]")
@@ -674,18 +538,11 @@ class InstallCyberPanel:
############## Start PowerDNS ###################### ############## Start PowerDNS ######################
try: command = 'systemctl enable pdns'
command = 'systemctl enable pdns' install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
install.preFlightsChecks.call(command, self.distro, '[startPowerDNS]',
'Start PowerDNS',
1, 0, os.EX_OSERR)
command = 'systemctl start pdns' command = 'systemctl start pdns'
install.preFlightsChecks.call(command, self.distro, '[startPowerDNS]', install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
'Start PowerDNS',
1, 0, os.EX_OSERR)
except BaseException, msg:
logging.InstallLog.writeToFile(str(msg) + " [startPowerDNS]")
def Main(cwd, mysql, distro, ent, serial = None, port = "8090", ftp = None, dns = None): def Main(cwd, mysql, distro, ent, serial = None, port = "8090", ftp = None, dns = None):
@@ -727,7 +584,6 @@ def Main(cwd, mysql, distro, ent, serial = None, port = "8090", ftp = None, dns
installer.installLiteSpeed() installer.installLiteSpeed()
if ent == 0: if ent == 0:
installer.changePortTo80() installer.changePortTo80()
installer.setupFileManager()
installer.installAllPHPVersions() installer.installAllPHPVersions()
if ent == 0: if ent == 0:
installer.fix_ols_configs() installer.fix_ols_configs()