Update index.py

pull/420/head
midoks 2 years ago
parent 9627c6e47b
commit 5444fe6455
  1. 8
      plugins/nezha/index.py

@ -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)

Loading…
Cancel
Save