command changes

This commit is contained in:
usmannasir
2023-12-22 12:37:10 +05:00
parent 7d13c1cb6c
commit 4e15ed7491
2 changed files with 15 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ SITE_NAME=${SITE_NAME:-"CyberPanel Site"}
### Install LSCache plugin
/usr/local/lsws/lsphp82/bin/php /usr/bin/wp plugin install litespeed-cache --allow-root --path="/usr/local/lsws/Example/html"
/usr/local/lsws/lsphp82/bin/php /usr/bin/wp plugin install litespeed-cache --allow-root --path="/usr/local/lsws/Example/html" --activate
# Start OpenLiteSpeed
/usr/local/lsws/bin/lswsctrl start

View File

@@ -291,7 +291,11 @@ services:
### WriteConfig to compose-file
command = f"mkdir -p /home/docker/{self.data['finalURL']}"
ProcessUtilities.executioner(command)
result, message = ProcessUtilities.outputExecutioner(command)
if result == 0:
logging.statusWriter(self.JobID, f'Error {str(message)} . [404]')
return 0
TempCompose = f'/home/cyberpanel/{self.data["finalURL"]}-docker-compose.yml'
@@ -300,7 +304,11 @@ services:
WriteToFile.close()
command = f"mv {TempCompose} {self.data['ComposePath']}"
ProcessUtilities.executioner(command)
result, message = ProcessUtilities.outputExecutioner(command)
if result == 0:
logging.statusWriter(self.JobID, f'Error {str(message)} . [404]')
return 0
command = f"chmod 600 {self.data['ComposePath']} && chown root:root {self.data['ComposePath']}"
ProcessUtilities.executioner(command, 'root', True)
@@ -308,10 +316,11 @@ services:
####
command = f"docker-compose -f {self.data['ComposePath']} -p '{self.data['SiteName']}' up -d"
result = ProcessUtilities.outputExecutioner(command)
result, message = ProcessUtilities.outputExecutioner(command)
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(result)
if result == 0:
logging.statusWriter(self.JobID, f'Error {str(message)} . [404]')
return 0
### Set up Proxy