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

Updated installation and deb creation

This commit is contained in:
Lukas Macura
2016-04-08 17:33:46 +02:00
parent d85b8f20d9
commit 1f42c13482
7 changed files with 184 additions and 47 deletions

View File

@@ -143,7 +143,7 @@ zaf_check_agent_config() {
# Update repo
zaf_update_repo() {
[ "$ZAF_GIT" != 1 ] && { zaf_err "Git is not installed. Exiting."; }
[ "$ZAF_GIT" != 1 ] && { zaf_err "Git is disabled or is not installed. Exiting."; }
if [ -z "${ZAF_PLUGINS_GITURL}" ] || [ -z "${ZAF_REPO_DIR}" ]; then
zaf_err "This system is not configured for git repository."
else
@@ -312,7 +312,18 @@ zaf_list_items() {
done
}
zaf_get_item() {
if which zabbix_get >/dev/null; then
zabbix_get -s localhost -k "$1" || zaf_wrn "Cannot reach agent on localhost. Please localhost to Server list."
return 11
else
zaf_wrn "Please install zabbix_get binary to check items over network."
return 11
fi
}
zaf_test_item() {
[ "$USER" != "zabbix" ] && zaf_wrn "You are not zabbix user. Test will be run with your privileges and sudo access!"
$ZAF_AGENT_BIN -t "$1"
}