pull/632/head
Mr Chen 5 months ago
parent eca12b2cf3
commit 0312c5ceb0
  1. 8
      web/admin/setup/init_cmd.py

@ -34,6 +34,8 @@ def init_cmd():
if not mw.isAppleSystem() and not os.path.exists("/etc/init.d"):
mw.execShell('mkdir -p /etc/init.d')
sys_name = mw.getOsName()
# initd
if os.path.exists('/etc/rc.d/init.d'):
initd_bin = '/etc/rc.d/init.d/mw'
@ -45,6 +47,10 @@ 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):
@ -55,7 +61,7 @@ def init_cmd():
# 加入自启动
mw.execShell('which update-rc.d && update-rc.d -f mw defaults')
# if mw.getOsName() == 'opensuse':
# if sys_name == 'opensuse':
# init_cmd_systemd()
return True

Loading…
Cancel
Save