1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-24 03:19:05 +01:00

Repaired preload

This commit is contained in:
Lukas Macura 2016-12-11 21:05:18 +01:00
parent 7f774f409d
commit e8be02436c

View File

@ -9,6 +9,15 @@
. ${ZAF_LIB_DIR}/zbxapi.lib.sh
. ${ZAF_LIB_DIR}/cache.lib.sh
if ! type zaf_version >/dev/null; then
echo "Problem loading libraries?"
exit 2
fi
zaf_debug_init
zaf_tmp_init
zaf_cache_init
# Global plugin parameters
[ -f ./params ] && for p in $(cat ./params); do
var=$p
@ -17,17 +26,6 @@
eval export $var="$value"
done
# Plugin specific functions if exists
[ -f ./functions.sh ] && . ./functions.sh
if ! type zaf_version >/dev/null; then
echo "Problem loading libraries?"
exit 2
fi
zaf_debug_init
zaf_tmp_init
zaf_cache_init
export ZAF_LIB_DIR
export ZAF_TMP_DIR
export ZAF_CACHE_DIR
@ -36,6 +34,9 @@ export ZAF_DEBUG
unset ZAF_LOG_STDERR
export PATH
# Plugin specific functions if exists
[ -f ./functions.sh ] && . ./functions.sh
if [ "$(basename $0)" = "preload.sh" ] && [ -n "$*" ]; then
tmpf=$(zaf_tmpfile preload)
export tmpf