Update index.py

This commit is contained in:
midoks
2023-06-28 01:40:41 +08:00
parent 9627c6e47b
commit 5444fe6455
+4 -4
View File
@@ -192,10 +192,6 @@ class App:
def imOp(self, method):
path = self.__agent_cfg
if not os.path.exists(path):
return '请先设置Agent配置!'
file = self.initDreplace()
if not mw.isAppleSystem():
@@ -225,6 +221,10 @@ class App:
def agOp(self, method):
file = self.initDAgent()
path = self.__agent_cfg
if not os.path.exists(path):
return '请先设置Agent配置!'
if not mw.isAppleSystem():
cmd = 'systemctl {} {}'.format(method, 'nezha-agent')
data = mw.execShell(cmd)