@ -48,19 +48,19 @@ build_opts() {
fi
else
# configfile exists?
if [ ! -f $configfile ];then
if [ ! -f " $configfile" ];then
echo "Error: $configfile not present"
exit -1
fi
# get table variable from config
table="$(grep -Ei '^table' $configfile|cut -d\ -f3)"
if [ -z $table ];then
table="$(grep -Ei '^table' $configfile|cut -d= -f3)"
table="$(grep -Ei '^table' " $configfile" | cut -d\ -f3)"
if [ -z " $table" ];then
table="$(grep -Ei '^table' " $configfile" | cut -d= -f3)"
fi
# error if directive is not presented in config
if [ -z $table ];then
if [ -z " $table" ];then
echo "Error: directive table= is not present in $configfile"
exit -1
fi
@ -79,9 +79,9 @@ build_opts() {
fi
# options
[[ "$FORK" == "no" ]] && OPTS+=" --foreground"
[[ "$LOG_STDERR" == "yes" ]] && OPTS+=" --log-stderr"
[[ "$FALLBACK" != "yes" ]] && OPTS+=" --no-fallback"
[[ "$FORK" == "no" ]] && OPTS+=" --foreground"
[[ "$LOG_STDERR" == "yes" ]] && OPTS+=" --log-stderr"
[[ "$FALLBACK" != "yes" ]] && OPTS+=" --no-fallback"
[ -z "$CONFIG_FILE" ] || OPTS+=" --config-file=$CONFIG_FILE"
[ -z "$CONFIG_SECTION" ] || OPTS+=" --config-section=$CONFIG_SECTION"
[ -z "$ADDRESS" ] || OPTS+=" --interface=$ADDRESS"