mirror of
https://github.com/limosek/zaf.git
synced 2024-11-21 18:09:06 +01:00
51 lines
617 B
Bash
Executable File
51 lines
617 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Some defaults
|
|
|
|
ZAF_AGENT_RESTART="service zabbix-agentd restart"
|
|
ZAF_AGENT_CONFIG="/etc/zabbix/zabbix_agentd.conf"
|
|
ZAF_LIB_DIR="/usr/lib/zaf/"
|
|
ZAF_PLUGINS_DIR="/usr/lib/zaf/plugins/"
|
|
|
|
if [ -f /etc/zaf.conf ]; then
|
|
. /etc/zaf.conf
|
|
fi
|
|
|
|
. ${ZAF_LIB_DIR}/zaf.lib.sh
|
|
|
|
case $1 in
|
|
|
|
check-agent-config)
|
|
zaf_check_agent_config
|
|
;;
|
|
|
|
update)
|
|
zaf_update_repo
|
|
;;
|
|
|
|
list)
|
|
zaf_list_installed_plugins
|
|
;;
|
|
|
|
info)
|
|
zaf_plugin_info "$2"
|
|
;;
|
|
|
|
install)
|
|
zaf_install_plugin "$2"
|
|
;;
|
|
|
|
remove)
|
|
zaf_remove_plugin "$2"
|
|
;;
|
|
|
|
*)
|
|
echo "$0 update"
|
|
echo "$0 list"
|
|
echo "$0 install plugin"
|
|
echo "$0 remove plugin"
|
|
;;
|
|
|
|
esac
|
|
|