shared 352 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
config="dooris.conf"

# warn if local config file is missing
if [ ! -f "${config}" ]; then
	echo "WARNING: ${config} is missing!" >&2
fi

# get password config value in a safe way
password="$(grep password ${config} 2>/dev/null|cut -d= -f2|tr -d ' \t')"
if [ -z "${password}" ]; then
	echo "WARNING: password in ${config} is missing!" >&2
fi