bug fix: remove not needed php on cent8 and ub20

This commit is contained in:
Usman Nasir
2020-06-04 00:17:29 +05:00
parent 46a2bbe04c
commit eae48c98e6
3 changed files with 9 additions and 4 deletions

View File

@@ -13,9 +13,11 @@ class PHPManager:
def findPHPVersions(): def findPHPVersions():
distro = ProcessUtilities.decideDistro() distro = ProcessUtilities.decideDistro()
if distro == ProcessUtilities.centos: if distro == ProcessUtilities.centos:
if distro == ProcessUtilities.cent8:
return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4']
return ['PHP 5.3', 'PHP 5.4', 'PHP 5.5', 'PHP 5.6', 'PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4'] return ['PHP 5.3', 'PHP 5.4', 'PHP 5.5', 'PHP 5.6', 'PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4']
elif distro == ProcessUtilities.cent8:
return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4']
elif distro == ProcessUtilities.ubuntu20:
return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4']
else: else:
return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4'] return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4']

View File

@@ -37,6 +37,9 @@ class backupSchedule:
print(("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message + "\n")) print(("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message + "\n"))
file.close() file.close()
if backupSchedule.backupLog == '':
pass
else:
BackupJobLogs(owner=backupSchedule.backupLog, status=status, message="[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message).save() BackupJobLogs(owner=backupSchedule.backupLog, status=status, message="[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message).save()
except IOError as msg: except IOError as msg:

View File

@@ -17,7 +17,7 @@ from plogical.processUtilities import ProcessUtilities
from re import match,I,M from re import match,I,M
import signal import signal
from datetime import datetime from datetime import datetime
from websiteFunctions.models import BackupJob, BackupJobLogs from websiteFunctions.models import BackupJob
class backupScheduleLocal: class backupScheduleLocal:
localBackupPath = '/home/cyberpanel/localBackupPath' localBackupPath = '/home/cyberpanel/localBackupPath'