concierge/shared

21 lines
616 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
basedir=$(dirname $(readlink "$0"))
config="dooris.conf"
# warn if local config file is missing
if [ ! -f "${basedir}/${config}" ]; then
echo "WARNING: ${config} is missing!" >&2
fi
# get password config value in a safe way
password="$(grep password ${basedir}/${config} 2>/dev/null|cut -d= -f2|tr -d ' \t')"
if [ -z "${password}" ]; then
echo "WARNING: password in ${config} is missing!" >&2
fi
2016-02-16 20:11:16 +01:00
2016-03-01 20:10:57 +01:00
# get tresor config value in a safe way
2016-02-16 20:11:16 +01:00
tresor="$(grep tresor ${basedir}/${config} 2>/dev/null|cut -d= -f2|tr -d ' \t')"
2016-03-01 20:10:57 +01:00
if [ -z "${tresor}" ]; then
2016-02-16 20:11:16 +01:00
echo "WARNING: tresor in ${config} is missing!" >&2
fi