use domain api in sub shell.

This commit is contained in:
neil 2016-03-31 21:28:54 +08:00
parent 6839de663f
commit 73b8b12016

28
le.sh
View File

@ -1041,19 +1041,25 @@ issue() {
continue
fi
if ! source $d_api ; then
_err "Load file $d_api error. Please check your api file and try again."
return 1
fi
(
if ! source $d_api ; then
_err "Load file $d_api error. Please check your api file and try again."
return 1
fi
addcommand="$Le_Webroot-add"
if ! command -v $addcommand ; then
_err "It seems that your api file is not correct, it must have a function named: $addcommand"
return 1
fi
addcommand="$Le_Webroot-add"
if ! command -v $addcommand ; then
_err "It seems that your api file is not correct, it must have a function named: $addcommand"
return 1
fi
if ! $addcommand $txtdomain $txt ; then
_err "Error add txt for domain:$txtdomain"
if ! $addcommand $txtdomain $txt ; then
_err "Error add txt for domain:$txtdomain"
return 1
fi
)
if [[ "$?" != "0" ]] ; then
return 1
fi
dnsadded='1'