1
0
mirror of https://github.com/limosek/zaf.git synced 2025-11-01 01:57:38 +01:00

Added basic items

This commit is contained in:
Lukas Macura
2016-03-24 17:26:34 +01:00
parent 94eb7dea06
commit 29f85902de
2 changed files with 33 additions and 1 deletions

View File

@@ -84,6 +84,10 @@ zaf_discovery(){
############################################ Zaf internal routines
zaf_version() {
echo master
}
# Restart zabbix agent
zaf_restart_agent() {
${ZAF_AGENT_RESTART}
@@ -271,6 +275,24 @@ zaf_show_plugin() {
fi
}
zaf_discovery_plugins() {
zaf_list_plugins | zaf_discovery '{#PLUGIN}'
}
zaf_plugin_version() {
if [ -z "$1" ]; then
echo "Missing plugin name";
exit 1
fi
plugindir="${ZAF_PLUGINS_DIR}/$1"
cfile="$plugindir/control"
if [ -d "$plugindir" ] ; then
zaf_ctrl_get_option "$cfile" Version
else
echo "Plugin $1 not installed"
fi
}
zaf_list_plugin_items() {
if [ -z "$1" ]; then
echo "Missing plugin name";