|
|
@ -162,18 +162,18 @@ def initDreplace(): |
|
|
|
print "ok" |
|
|
|
print "ok" |
|
|
|
exit(0) |
|
|
|
exit(0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
file_bin = initD_path + '/' + getPluginName() |
|
|
|
if not os.path.exists(initD_path): |
|
|
|
if not os.path.exists(initD_path): |
|
|
|
os.mkdir(initD_path) |
|
|
|
os.mkdir(initD_path) |
|
|
|
file_bin = initD_path + '/' + getPluginName() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# initd replace |
|
|
|
# initd replace |
|
|
|
content = mw.readFile(file_tpl) |
|
|
|
content = mw.readFile(file_tpl) |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
mw.writeFile(file_bin, content) |
|
|
|
mw.writeFile(file_bin, content) |
|
|
|
mw.execShell('chmod +x ' + file_bin) |
|
|
|
mw.execShell('chmod +x ' + file_bin) |
|
|
|
|
|
|
|
|
|
|
|
# config replace |
|
|
|
# config replace |
|
|
|
confReplace() |
|
|
|
confReplace() |
|
|
|
|
|
|
|
|
|
|
|
# make nginx vhost or other |
|
|
|
# make nginx vhost or other |
|
|
|
makeConf() |
|
|
|
makeConf() |
|
|
|