|
|
@ -86,7 +86,7 @@ def getRunLog(): |
|
|
|
def initDreplace(): |
|
|
|
def initDreplace(): |
|
|
|
|
|
|
|
|
|
|
|
ddir = getServerDir() + '/workers' |
|
|
|
ddir = getServerDir() + '/workers' |
|
|
|
# if not os.path.exists(ddir): |
|
|
|
if not os.path.exists(ddir): |
|
|
|
sdir = getPluginDir() + '/workers' |
|
|
|
sdir = getPluginDir() + '/workers' |
|
|
|
public.execShell('cp -rf ' + sdir + ' ' + getServerDir()) |
|
|
|
public.execShell('cp -rf ' + sdir + ' ' + getServerDir()) |
|
|
|
|
|
|
|
|
|
|
@ -105,6 +105,7 @@ def initDreplace(): |
|
|
|
file_bin = initD_path + '/' + getPluginName() |
|
|
|
file_bin = initD_path + '/' + getPluginName() |
|
|
|
|
|
|
|
|
|
|
|
# initd replace |
|
|
|
# initd replace |
|
|
|
|
|
|
|
if not os.path.exists(file_bin): |
|
|
|
content = public.readFile(file_tpl) |
|
|
|
content = public.readFile(file_tpl) |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
content = content.replace('{$SERVER_PATH}', service_path) |
|
|
|
public.writeFile(file_bin, content) |
|
|
|
public.writeFile(file_bin, content) |
|
|
|