From ff43f163e0838f60996757106966ba7e8a02a409 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 29 Mar 2019 13:30:42 +0100 Subject: [PATCH] add check_proc_zabbixagent and check_proc_zabbixserver function --- scripts/_common.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 79bf17b..4e07fc2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -137,4 +137,24 @@ link_template(){ ynh_print_warn "Template Yunohost no linked to Zabbix server !" fi +} + +check_proc_zabbixserver(){ + pgrep zabbix_server >/dev/null + if [ $? -eq 0 ];then + ynh_print_info "zabbix server is started !" + else + ynh_print_err "Zabbix Server not started, try to start it with the yunohost interface." + ynh_print_err "If Zabbix Server can't start, please open a issue on https://github.com/YunoHost-Apps/zabbix_ynh/issues" + fi +} + +check_proc_zabbixagent(){ + pgrep zabbix_agentd >/dev/null + if [ $? -eq 0 ];then + ynh_print_info "zabbix agent is started" + else + ynh_print_err "Zabbix agent not started, try to start it with the yunohost interface." + ynh_print_err "If Zabbix agent can't start, please open a issue on https://github.com/YunoHost-Apps/zabbix_ynh/issues" + fi } \ No newline at end of file