|
|
@ -109,6 +109,16 @@ def initDreplace(): |
|
|
|
content = contentReplace(content) |
|
|
|
content = contentReplace(content) |
|
|
|
mw.writeFile(pureFtpdConfig, content) |
|
|
|
mw.writeFile(pureFtpdConfig, content) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# systemd |
|
|
|
|
|
|
|
systemDir = '/lib/systemd/system' |
|
|
|
|
|
|
|
systemService = systemDir + '/pureftp.service' |
|
|
|
|
|
|
|
systemServiceTpl = getPluginDir() + '/init.d/pureftp.service.tpl' |
|
|
|
|
|
|
|
if os.path.exists(systemDir) and not os.path.exists(systemService): |
|
|
|
|
|
|
|
se_content = mw.readFile(systemServiceTpl) |
|
|
|
|
|
|
|
se_content = se_content.replace('{$SERVER_PATH}', service_path) |
|
|
|
|
|
|
|
mw.writeFile(systemService, se_content) |
|
|
|
|
|
|
|
mw.execShell('systemctl daemon-reload') |
|
|
|
|
|
|
|
|
|
|
|
return file_bin |
|
|
|
return file_bin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|