优化rsyncd启动配置

This commit is contained in:
Mr Chen
2019-04-02 15:13:41 +08:00
parent c5b6df846b
commit 8a522c43e5
+3 -1
View File
@@ -90,7 +90,9 @@ def getLog():
def initConf():
conf_path = appConf()
conf = public.readFile(conf_path)
conf = re.sub('^#(.*)', '', conf)
compile_sub = re.compile('^#(.*)',re.M)
conf = compile_sub.sub('', conf)
conf_tpl_path = getPluginDir() + '/conf/rsyncd.conf'
if conf.strip() == '':
content = public.readFile(conf_tpl_path)