Browse Source

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

pull/2076/head
ahwayakchih 7 years ago
parent
commit
e5475b7e3e
  1. 5
      deploy/mydevil.sh
  2. 10
      dnsapi/dns_mydevil.sh

5
deploy/mydevil.sh

@ -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."

10
dnsapi/dns_mydevil.sh

@ -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")

Loading…
Cancel
Save