mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 22:36:12 +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,19 +237,33 @@ def servicesStatus(request):
|
|||||||
dockerStatus.append(getServiceStats('docker'))
|
dockerStatus.append(getServiceStats('docker'))
|
||||||
|
|
||||||
# mysql status
|
# mysql status
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
||||||
result = s.connect_ex(('127.0.0.1', 3306))
|
|
||||||
|
|
||||||
if result == 0:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
sqlStatus.append(1)
|
|
||||||
else:
|
mysqlResult = ProcessUtilities.outputExecutioner('systemctl status mysql')
|
||||||
sqlStatus.append(0)
|
|
||||||
s.close()
|
if mysqlResult.find('active (running)') > -1:
|
||||||
|
sqlStatus.append(1)
|
||||||
|
sqlStatus.append(getMemStats('mariadbd'))
|
||||||
|
else:
|
||||||
|
sqlStatus.append(0)
|
||||||
|
sqlStatus.append(0)
|
||||||
|
|
||||||
|
|
||||||
if getServiceStats('mysql'):
|
|
||||||
sqlStatus.append(getMemStats('mysql'))
|
|
||||||
else:
|
else:
|
||||||
sqlStatus.append(0)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
result = s.connect_ex(('127.0.0.1', 3306))
|
||||||
|
|
||||||
|
if result == 0:
|
||||||
|
sqlStatus.append(1)
|
||||||
|
else:
|
||||||
|
sqlStatus.append(0)
|
||||||
|
s.close()
|
||||||
|
|
||||||
|
if getServiceStats('mysql'):
|
||||||
|
sqlStatus.append(getMemStats('mysql'))
|
||||||
|
else:
|
||||||
|
sqlStatus.append(0)
|
||||||
|
|
||||||
dnsStatus.append(getServiceStats('pdns'))
|
dnsStatus.append(getServiceStats('pdns'))
|
||||||
if getServiceStats('pdns'):
|
if getServiceStats('pdns'):
|
||||||
|
|||||||
Reference in New Issue
Block a user