Update init_cmd.py

This commit is contained in:
Mr Chen 2024-12-02 18:03:11 +08:00
parent 824032b338
commit 408c9c291b
1 changed files with 0 additions and 6 deletions

View File

@ -44,17 +44,11 @@ def init_cmd():
# 加入自启动
mw.execShell('which chkconfig && chkconfig --add mw')
# if sys_name == 'opensuse':
# mw.execShell('which chkconfig && chkconfig --level 3 mw on')
if os.path.exists('/etc/init.d'):
initd_bin = '/etc/init.d/mw'
# if not os.access(initd_bin, os.W_OK):
# return False
mw.writeFile(initd_bin, cmd_content)
mw.execShell('chmod +x ' + initd_bin)
# 加入自启动
mw.execShell('which update-rc.d && update-rc.d -f mw defaults')