From d3fb54b11341afc41e08ae011d210ebdf80de6d2 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 30 Jul 2022 14:12:18 +0800 Subject: [PATCH] Update index.py --- plugins/rsyncd/index.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/rsyncd/index.py b/plugins/rsyncd/index.py index 7891e137b..972272888 100755 --- a/plugins/rsyncd/index.py +++ b/plugins/rsyncd/index.py @@ -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'