|
|
@ -126,7 +126,7 @@ def status(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def contentReplace(content): |
|
|
|
def contentReplace(content): |
|
|
|
service_path = os.path.dirname(os.getcwd()) |
|
|
|
service_path = mw.getServerDir() |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
content = content.replace('{$PLUGIN_PATH}', getPluginDir()) |
|
|
|
content = content.replace('{$PLUGIN_PATH}', getPluginDir()) |
|
|
|
|
|
|
|
|
|
|
@ -166,7 +166,7 @@ def copyScripts(): |
|
|
|
def initDreplace(): |
|
|
|
def initDreplace(): |
|
|
|
|
|
|
|
|
|
|
|
file_tpl = getInitDTpl() |
|
|
|
file_tpl = getInitDTpl() |
|
|
|
service_path = os.path.dirname(os.getcwd()) |
|
|
|
service_path = mw.getServerDir() |
|
|
|
|
|
|
|
|
|
|
|
initD_path = getServerDir() + '/init.d' |
|
|
|
initD_path = getServerDir() + '/init.d' |
|
|
|
if not os.path.exists(initD_path): |
|
|
|
if not os.path.exists(initD_path): |
|
|
@ -202,7 +202,6 @@ def initDreplace(): |
|
|
|
systemService = systemDir + '/' + getPluginName() + '.service' |
|
|
|
systemService = systemDir + '/' + getPluginName() + '.service' |
|
|
|
if os.path.exists(systemDir) and not os.path.exists(systemService): |
|
|
|
if os.path.exists(systemDir) and not os.path.exists(systemService): |
|
|
|
systemServiceTpl = getPluginDir() + '/init.d/' + getPluginName() + '.service.tpl' |
|
|
|
systemServiceTpl = getPluginDir() + '/init.d/' + getPluginName() + '.service.tpl' |
|
|
|
service_path = mw.getServerDir() |
|
|
|
|
|
|
|
content = mw.readFile(systemServiceTpl) |
|
|
|
content = mw.readFile(systemServiceTpl) |
|
|
|
content = contentReplace(content) |
|
|
|
content = contentReplace(content) |
|
|
|
mw.writeFile(systemService, content) |
|
|
|
mw.writeFile(systemService, content) |
|
|
|