Corrections to consul discovery
This commit is contained in:
parent
a8585a6d92
commit
d6d52d2ea2
1 changed files with 2 additions and 4 deletions
|
@ -5,8 +5,6 @@ consulDir="/var/backups/consul"
|
|||
scriptDir="$(dirname "$0")"
|
||||
|
||||
readConfig() {
|
||||
local $config
|
||||
|
||||
if [[ -r "${scriptDir}/../config/consul_backup.cfg" ]]; then
|
||||
source "${scriptDir}/../config/consul_backup.cfg"
|
||||
fi
|
||||
|
@ -28,12 +26,12 @@ check() {
|
|||
return 3
|
||||
fi
|
||||
else
|
||||
if ! which consul; then
|
||||
if ! which consul &>/dev/null; then
|
||||
echo "Cannot find Consul in PATH"
|
||||
return 2
|
||||
fi
|
||||
if [[ -x "$(which consul)" ]]; then
|
||||
CONSUL_PATH="$(basename 'which consul')"
|
||||
CONSUL_PATH="$(basename "$(which consul)")"
|
||||
echo "Found Consul in $CONSUL_PATH"
|
||||
else
|
||||
echo "FATAL: Cannot execute Consul"
|
||||
|
|
Loading…
Reference in a new issue