1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-13 05:59:06 +01:00
limosek-zaf/lib/preload.sh

38 lines
686 B
Bash
Raw Normal View History

2016-04-01 12:20:23 +02:00
#!/bin/sh
. /etc/zaf.conf
2016-04-01 15:51:45 +02:00
2016-04-21 15:29:48 +02:00
. ${ZAF_LIB_DIR}/zaf.lib.sh
. ${ZAF_LIB_DIR}/plugin.lib.sh
. ${ZAF_LIB_DIR}/ctrl.lib.sh
. ${ZAF_LIB_DIR}/os.lib.sh
. ${ZAF_LIB_DIR}/zbxapi.lib.sh
. ${ZAF_LIB_DIR}/cache.lib.sh
# Plugin specific functions if exists
[ -f ./functions.sh ] && . ./functions.sh
if ! type zaf_version >/dev/null; then
echo "Problem loading libraries?"
exit 2
2016-04-21 15:29:48 +02:00
fi
zaf_debug_init
zaf_tmp_init
zaf_cache_init
2016-04-01 15:51:45 +02:00
export ZAF_LIB_DIR
export ZAF_TMP_DIR
export ZAF_CACHE_DIR
2016-04-01 15:51:45 +02:00
export ZAF_PLUGINS_DIR
2016-04-21 15:29:48 +02:00
export ZAF_DEBUG
unset ZAF_LOG_STDERR
export PATH
2016-04-21 15:29:48 +02:00
if [ "$(basename $0)" = "preload.sh" ] && [ -n "$*" ]; then
tmpf=$(zaf_tmpfile preload)
$@ 2>$tmpf
[ -s $tmpf ] && zaf_wrn <$tmpf
fi
2016-04-01 12:20:23 +02:00