fix: check if devil command exists, as requested by @Neilpang

This commit is contained in:
ahwayakchih 2019-02-11 17:11:58 +01:00
parent 3fa6fb5731
commit e5475b7e3e
2 changed files with 15 additions and 0 deletions

View File

@ -27,6 +27,11 @@ mydevil_deploy() {
_debug _cca "$_cca"
_debug _cfullchain "$_cfullchain"
if ! _exists "devil" ; then
_err "Could not find 'devil' command."
return 1
fi
ip=$(mydevil_get_ip "$_cdomain")
if [ -z "$ip" ]; then
_err "Could not find IP for domain $_cdomain."

View File

@ -18,6 +18,11 @@ dns_mydevil_add() {
txtvalue=$2
domain=""
if ! _exists "devil" ; then
_err "Could not find 'devil' command."
return 1
fi
_info "Using mydevil"
domain=$(mydevil_get_domain "$fulldomain")
@ -48,6 +53,11 @@ dns_mydevil_rm() {
txtvalue=$2
domain=""
if ! _exists "devil" ; then
_err "Could not find 'devil' command."
return 1
fi
_info "Using mydevil"
domain=$(mydevil_get_domain "$fulldomain")