54 lines
956 B
Bash
54 lines
956 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
#\
|
||
|
# \
|
||
|
# \_ _ _ _ _ _ _ _ _ _ _ _ _
|
||
|
# #\
|
||
|
# # \
|
||
|
# heartbeat monitoring # \
|
||
|
# script # /
|
||
|
# # /
|
||
|
# _ _ _ _ _ _ _ _ _ _ _ _ _#/
|
||
|
# /
|
||
|
# /
|
||
|
#/
|
||
|
|
||
|
# **** config section ****
|
||
|
author="david@socialnerds.org"
|
||
|
version="0.2"
|
||
|
giturl="git://git.aec.at/mbots.git"
|
||
|
hostsfile="/etc/hosts"
|
||
|
log2stdout="1"
|
||
|
log2file="0"
|
||
|
#logfile=/var/log/mbots.log
|
||
|
log2syslog="1"
|
||
|
logwhat="mbots_hb"
|
||
|
|
||
|
|
||
|
# **** preflight ****
|
||
|
|
||
|
#searching for bashlib
|
||
|
if [ -z $BASHLIB ]; then
|
||
|
echo "ERROR: bashlib environment variable not set. terminating."
|
||
|
exit 1
|
||
|
else
|
||
|
$bashlibpath=$BASHLIB
|
||
|
fi
|
||
|
|
||
|
#load bashlib
|
||
|
if [ -d $bashlibpath ]; then
|
||
|
source $bashlibpath/main
|
||
|
source $bashlibpath/logengine
|
||
|
log debug "preflight - logengine loaded."
|
||
|
else
|
||
|
echo "ERROR: bashlib not found. terminating."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
# **** end of script ****
|