mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-07-08 17:33:46 +02:00
Composer no test
This commit is contained in:
6
install/composer-no-test.sh
Normal file
6
install/composer-no-test.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
#php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
php composer-setup.php
|
||||
php -r "unlink('composer-setup.php');"
|
||||
cp composer.phar /usr/bin/composer
|
||||
@@ -2922,19 +2922,38 @@ milter_default_action = accept
|
||||
|
||||
def setupPHPAndComposer(self):
|
||||
try:
|
||||
if self.distro == ubuntu:
|
||||
if not os.access('/usr/local/lsws/lsphp70/bin/php'):
|
||||
if os.access('/usr/local/lsws/lsphp70/bin/php7.0'):
|
||||
os.symlink('/usr/local/lsws/lsphp70/bin/php7.0', '/usr/local/lsws/lsphp70/bin/php')
|
||||
if not os.access('/usr/local/lsws/lsphp71/bin/php'):
|
||||
if os.access('/usr/local/lsws/lsphp71/bin/php7.1'):
|
||||
os.symlink('/usr/local/lsws/lsphp71/bin/php7.1', '/usr/local/lsws/lsphp71/bin/php')
|
||||
if not os.access('/usr/local/lsws/lsphp72/bin/php'):
|
||||
if os.access('/usr/local/lsws/lsphp72/bin/php7.2'):
|
||||
os.symlink('/usr/local/lsws/lsphp72/bin/php7.2', '/usr/local/lsws/lsphp72/bin/php')
|
||||
|
||||
command = "cp /usr/local/lsws/lsphp71/bin/php /usr/bin/"
|
||||
res = subprocess.call(shlex.split(command))
|
||||
|
||||
os.chdir(self.cwd)
|
||||
|
||||
command = "chmod +x composer.sh"
|
||||
if self.distro == centos:
|
||||
command = "chmod +x composer.sh"
|
||||
else:
|
||||
command = "chmod +x composer-no-test.sh"
|
||||
|
||||
res = subprocess.call(shlex.split(command))
|
||||
|
||||
command = "./composer.sh"
|
||||
if self.distro == centos:
|
||||
command = "./composer.sh"
|
||||
else:
|
||||
command = "./composer-no-test.sh"
|
||||
|
||||
res = subprocess.call(shlex.split(command))
|
||||
|
||||
except OSError, msg:
|
||||
logging.InstallLog.writeToFile(str(msg) + " [setupPHPAndComposer]")
|
||||
self.stdOut('Setup PHP error: ' + str(msg) + " [setupPHPAndComposer]", 1, 1, os.EX_OSERR)
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
@@ -3072,7 +3091,7 @@ milter_default_action = accept
|
||||
writeToFile.close()
|
||||
|
||||
except OSError, msg:
|
||||
logging.InstallLog.writeToFile(str(msg) + " [enableDisableDNS]")
|
||||
preFlightsChecks.stdOut('Error disabling DNS: ' + str(msg) + " [enableDisableDNS]", 1, 0)
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
@@ -3098,7 +3117,7 @@ milter_default_action = accept
|
||||
writeToFile.close()
|
||||
|
||||
except OSError, msg:
|
||||
logging.InstallLog.writeToFile(str(msg) + " [enableDisableEmail]")
|
||||
preFlightsChecks.stdOut('Error disabling Email: ' + str(msg) + " [enableDisableEmail]", 1, 0)
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
@@ -3124,7 +3143,7 @@ milter_default_action = accept
|
||||
writeToFile.close()
|
||||
|
||||
except OSError, msg:
|
||||
logging.InstallLog.writeToFile(str(msg) + " [enableDisableEmail]")
|
||||
preFlightsChecks.stdOut('Error disabling FTP: ' + str(msg) + " [enableDisableFTP]", 1, 0)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user