mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 14:26:16 +01:00
Merge branch 'v2.0.3' into v2.0.4-dev
This commit is contained in:
@@ -2038,16 +2038,10 @@ echo $oConfig->Save() ? 'Done' : 'Error';
|
|||||||
|
|
||||||
### Restore dovecot/postfix conf
|
### Restore dovecot/postfix conf
|
||||||
|
|
||||||
command = 'rm -rf %s' % (dovecotConfPath)
|
command = 'cp -pR %s/dovecot/ /etc/' % (configbackups)
|
||||||
Upgrade.executioner(command, 0)
|
Upgrade.executioner(command, 0)
|
||||||
|
|
||||||
command = 'rm -rf %s' % (postfixConfPath)
|
command = 'cp -pR %s/postfix/ /etc/' % (configbackups)
|
||||||
Upgrade.executioner(command, 0)
|
|
||||||
|
|
||||||
command = 'mv %s/dovecot /etc/' % (configbackups)
|
|
||||||
Upgrade.executioner(command, 0)
|
|
||||||
|
|
||||||
command = 'mv %s/postfix /etc/' % (configbackups)
|
|
||||||
Upgrade.executioner(command, 0)
|
Upgrade.executioner(command, 0)
|
||||||
|
|
||||||
## Restored
|
## Restored
|
||||||
@@ -2093,16 +2087,10 @@ echo $oConfig->Save() ? 'Done' : 'Error';
|
|||||||
|
|
||||||
### Restore dovecot/postfix conf
|
### Restore dovecot/postfix conf
|
||||||
|
|
||||||
command = 'rm -rf %s' % (dovecotConfPath)
|
command = 'cp -pR %s/dovecot/ /etc/' % (configbackups)
|
||||||
Upgrade.executioner(command, 0)
|
Upgrade.executioner(command, 0)
|
||||||
|
|
||||||
command = 'rm -rf %s' % (postfixConfPath)
|
command = 'cp -pR %s/postfix/ /etc/' % (configbackups)
|
||||||
Upgrade.executioner(command, 0)
|
|
||||||
|
|
||||||
command = 'mv %s/dovecot /etc/' % (configbackups)
|
|
||||||
Upgrade.executioner(command, 0)
|
|
||||||
|
|
||||||
command = 'mv %s/postfix /etc/' % (configbackups)
|
|
||||||
Upgrade.executioner(command, 0)
|
Upgrade.executioner(command, 0)
|
||||||
|
|
||||||
## Restored
|
## Restored
|
||||||
|
|||||||
@@ -237,6 +237,20 @@ def servicesStatus(request):
|
|||||||
dockerStatus.append(getServiceStats('docker'))
|
dockerStatus.append(getServiceStats('docker'))
|
||||||
|
|
||||||
# mysql status
|
# mysql status
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
|
|
||||||
|
mysqlResult = ProcessUtilities.outputExecutioner('systemctl status mysql')
|
||||||
|
|
||||||
|
if mysqlResult.find('active (running)') > -1:
|
||||||
|
sqlStatus.append(1)
|
||||||
|
sqlStatus.append(getMemStats('mariadbd'))
|
||||||
|
else:
|
||||||
|
sqlStatus.append(0)
|
||||||
|
sqlStatus.append(0)
|
||||||
|
|
||||||
|
|
||||||
|
else:
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
result = s.connect_ex(('127.0.0.1', 3306))
|
result = s.connect_ex(('127.0.0.1', 3306))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user