From 2e8a27e6aceaece9e2a29df08d56c1b3e25cae98 Mon Sep 17 00:00:00 2001 From: Lukas Macura Date: Wed, 7 Dec 2016 12:51:15 +0100 Subject: [PATCH] Plugins can be entered divided by comas --- install.sh | 2 +- lib/plugin.lib.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ed0993b..d1ad40b 100755 --- a/install.sh +++ b/install.sh @@ -338,7 +338,7 @@ zaf_configure(){ zaf_set_option ZAF_ZBXAPI_PASS "$ZAF_ZBXAPI_PASS" zaf_set_option ZAF_ZBXAPI_AUTHTYPE "$ZAF_ZBXAPI_AUTHTYPE" if [ -n "$ZAF_PLUGINS" ]; then - for p in $ZAF_PLUGINS; do + for p in $(echo $ZAF_PLUGINS | tr ',' ' '); do zaf_install_plugin $p done fi diff --git a/lib/plugin.lib.sh b/lib/plugin.lib.sh index 3b87c44..f5ad9fd 100644 --- a/lib/plugin.lib.sh +++ b/lib/plugin.lib.sh @@ -86,7 +86,7 @@ zaf_prepare_plugin() { fi zaf_install_dir "$plugindir" zaf_dbg "Fetching control file from $url ..." - if zaf_fetch_url "$url" >"${INSTALL_PREFIX}/${control}"; then + if zaf_fetch_url "$url" >"${INSTALL_PREFIX}/${control}" && [ -s "${INSTALL_PREFIX}/${control}" ]; then [ -z "${INSTALL_PREFIX}" ] && zaf_ctrl_check_deps "${control}" pluginname=$(zaf_ctrl_get_global_block <"${INSTALL_PREFIX}/${control}" | zaf_block_get_option Plugin) [ "$(basename $plugindir)" != "$pluginname" ] && zaf_err "prepare_plugin: Plugin name mismach ($plugindir vs ${INSTALL_PREFIX}/${control})!"