Update task_manager_index.py

pull/586/head
Mr Chen 11 months ago
parent 660d95616d
commit d9fbfcb184
  1. 4
      plugins/task_manager/task_manager_index.py

@ -1261,8 +1261,8 @@ class mainClass(object):
systemctl_user_path = '/usr/lib/systemd/system/'
systemctl_run_path = '/etc/systemd/system/multi-user.target.wants/'
if os.path.exists(systemctl_user_path + serviceName + '.service'):
runlevel = mw.execShell('runlevel')[0].split()[1]
if get.runlevel != runlevel:
runlevel_cmd = mw.execShell('runlevel')[0].split()[1]
if runlevel_cmd != runlevel:
return mw.returnData(False,'Systemctl托管的服务不能设置非当前运行级别的状态')
action = 'enable'
if os.path.exists(systemctl_run_path + serviceName + '.service'):

Loading…
Cancel
Save