16 lines
284 B
Text
16 lines
284 B
Text
|
# Determine the configuration directory used by consul.
|
||
|
|
||
|
check_dir () {
|
||
|
if [ -d "$1" ]; then
|
||
|
echo -n "$1"
|
||
|
exit
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
check_dir '/etc/consul/conf.d'
|
||
|
check_dir '/etc/consul.d'
|
||
|
check_dir '/etc/consul'
|
||
|
|
||
|
echo 'Could not determine consul configuration dir. Exiting.' >&2
|
||
|
exit 1
|