This commit is contained in:
Mr Chen 2024-10-16 01:17:30 +08:00
parent fb8c1d124e
commit 17d446161b
2 changed files with 11 additions and 0 deletions

View File

@ -123,6 +123,13 @@ def contentReplace(content):
return content
def initJailD():
dst_conf = f2bEtcDir() + '/jail.d/default.conf'
dst_conf_tpl = getPluginDir() + '/tpl/jail.d/default.conf'
if not os.path.exists(dst_conf):
content = mw.readFile(dst_conf_tpl)
content = contentReplace(content)
mw.writeFile(dst_conf, content)
def initDreplace():
@ -143,6 +150,8 @@ def initDreplace():
# mw.writeFile(dst_conf, content)
# mw.writeFile(dst_conf_init, 'ok')
initJailD()
# systemd
systemDir = mw.systemdCfgDir()
systemService = systemDir + '/' + getPluginName() + '.service'

View File

@ -0,0 +1,2 @@
[DEFAULT]
backend = systemd