Skip to content

Commit

Permalink
Update index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jul 15, 2024
1 parent d018163 commit 0b65068
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/zabbix/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ def zOp(method):

current_os = mw.getOs()
if current_os.startswith("freebsd"):
data = mw.execShell('service zabbix-server ' + method)
data = mw.execShell('service zabbix_server ' + method)
if data[1] == '':
return 'ok'
return data[1]

data = mw.execShell('systemctl ' + method + ' zabbix-server')
data = mw.execShell('systemctl ' + method + ' zabbix_server')
if data[1] == '':
return 'ok'
return data[1]
Expand All @@ -246,7 +246,7 @@ def initdStatus():
if current_os == 'darwin':
return "Apple Computer does not support"

shell_cmd = 'systemctl status zabbix-server | grep loaded | grep "enabled;"'
shell_cmd = 'systemctl status zabbix_server | grep loaded | grep "enabled;"'
data = mw.execShell(shell_cmd)
if data[0] == '':
return 'fail'
Expand All @@ -258,7 +258,7 @@ def initdInstall():
if current_os == 'darwin':
return "Apple Computer does not support"

mw.execShell('systemctl enable zabbix-server')
mw.execShell('systemctl enable zabbix_server')
return 'ok'


Expand All @@ -267,7 +267,7 @@ def initdUinstall():
if current_os == 'darwin':
return "Apple Computer does not support"

mw.execShell('systemctl disable zabbix-server')
mw.execShell('systemctl disable zabbix_server')
return 'ok'


Expand Down

0 comments on commit 0b65068

Please sign in to comment.