|
|
@ -110,8 +110,9 @@ def initDreplace(): |
|
|
|
pureFtpdConfigBak = getServerDir() + "/etc/pure-ftpd.bak.conf" |
|
|
|
pureFtpdConfigBak = getServerDir() + "/etc/pure-ftpd.bak.conf" |
|
|
|
pureFtpdConfigTpl = getPluginDir() + "/conf/pure-ftpd.conf" |
|
|
|
pureFtpdConfigTpl = getPluginDir() + "/conf/pure-ftpd.conf" |
|
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(pureFtpdConfigBak): |
|
|
|
if not os.path.exists(pureFtpdConfigBak) or not os.path.exists(pureFtpdConfig): |
|
|
|
shutil.copyfile(pureFtpdConfig, pureFtpdConfigBak) |
|
|
|
if os.path.exists(pureFtpdConfig): |
|
|
|
|
|
|
|
shutil.copyfile(pureFtpdConfig, pureFtpdConfigBak) |
|
|
|
content = mw.readFile(pureFtpdConfigTpl) |
|
|
|
content = mw.readFile(pureFtpdConfigTpl) |
|
|
|
content = contentReplace(content) |
|
|
|
content = contentReplace(content) |
|
|
|
mw.writeFile(pureFtpdConfig, content) |
|
|
|
mw.writeFile(pureFtpdConfig, content) |
|
|
|