|
|
|
@ -81,33 +81,29 @@ def status(): |
|
|
|
|
return 'start' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def start(): |
|
|
|
|
data = mw.execShell('systemctl start ' + getPluginName()) |
|
|
|
|
def vaOp(method): |
|
|
|
|
mw.execShell("systemctl daemon-reload") |
|
|
|
|
data = mw.execShell('systemctl ' + method + ' ' + getPluginName()) |
|
|
|
|
if data[1] == '': |
|
|
|
|
return 'ok' |
|
|
|
|
return 'fail' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def start(): |
|
|
|
|
return vaOp('start') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def stop(): |
|
|
|
|
data = mw.execShell('systemctl stop ' + getPluginName()) |
|
|
|
|
if data[1] == '': |
|
|
|
|
return 'ok' |
|
|
|
|
return 'fail' |
|
|
|
|
return vaOp('stop') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def restart(): |
|
|
|
|
data = mw.execShell('systemctl restart ' + getPluginName()) |
|
|
|
|
if data[1] == '': |
|
|
|
|
return 'ok' |
|
|
|
|
return 'fail' |
|
|
|
|
return vaOp('restart') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def reload(): |
|
|
|
|
# file = initDreplace() |
|
|
|
|
data = mw.execShell('systemctl reload ' + getPluginName()) |
|
|
|
|
if data[1] == '': |
|
|
|
|
return 'ok' |
|
|
|
|
return 'fail' |
|
|
|
|
return vaOp('reload') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def runInfo(): |
|
|
|
@ -138,7 +134,6 @@ def readConfigTpl(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def initdStatus(): |
|
|
|
|
if not app_debug: |
|
|
|
|
if mw.isAppleSystem(): |
|
|
|
|
return "Apple Computer does not support" |
|
|
|
|
|
|
|
|
@ -151,8 +146,6 @@ def initdStatus(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def initdInstall(): |
|
|
|
|
import shutil |
|
|
|
|
if not app_debug: |
|
|
|
|
if mw.isAppleSystem(): |
|
|
|
|
return "Apple Computer does not support" |
|
|
|
|
|
|
|
|
@ -161,7 +154,6 @@ def initdInstall(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def initdUinstall(): |
|
|
|
|
if not app_debug: |
|
|
|
|
if mw.isAppleSystem(): |
|
|
|
|
return "Apple Computer does not support" |
|
|
|
|
|
|
|
|
|