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