Update index.py

This commit is contained in:
midoks 2022-07-30 14:12:18 +08:00
parent fe0dda838d
commit d3fb54b113
1 changed files with 8 additions and 0 deletions

View File

@ -279,6 +279,12 @@ def initdStatus():
data = mw.execShell(shell_cmd)
if data[0] == '':
return 'fail'
shell_cmd = 'systemctl status lsyncd | grep loaded | grep "enabled;"'
data = mw.execShell(shell_cmd)
if data[0] == '':
return 'fail'
return 'ok'
@ -286,6 +292,7 @@ def initdInstall():
if mw.isAppleSystem():
return "Apple Computer does not support"
mw.execShell('systemctl enable lsyncd')
mw.execShell('systemctl enable rsyncd')
return 'ok'
@ -295,6 +302,7 @@ def initdUinstall():
if mw.isAppleSystem():
return "Apple Computer does not support"
mw.execShell('systemctl diable lsyncd')
mw.execShell('systemctl diable rsyncd')
return 'ok'