Update index.py

This commit is contained in:
Mr Chen
2025-01-10 11:48:20 +08:00
parent 255ed5944f
commit 84ceef47cb
+20 -8
View File
@@ -281,21 +281,33 @@ def rsyncOp(method):
return 'fail'
def start():
return rsyncOp('start')
def lsyncdOp(method):
if not mw.isAppleSystem():
data = mw.execShell('systemctl ' + method + ' lsyncd')
if data[1] == '':
return 'ok'
return 'fail'
return 'fail'
def start():
status = rsyncOp('start')
lsyncdOp('start')
return status
def stop():
return rsyncOp('stop')
status = rsyncOp('stop')
lsyncdOp('stop')
return status
def restart():
return rsyncOp('restart')
status = rsyncOp('restart')
lsyncdOp('restart')
return status
def reload():
return rsyncOp('reload')
status = rsyncOp('reload')
lsyncdOp('reload')
return status
def initdStatus():
if mw.isAppleSystem():