39c2c4c19e
this supports arbitrary symlinking of the scripts and retrives the actual dirname where the files are laying.
15 lines
410 B
Bash
Executable file
15 lines
410 B
Bash
Executable file
#!/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
|