Bug #9665 ยป h_api-fix.patch
security/pfSense-pkg-acme/files/usr/local/pkg/acme/acme.sh | ||
---|---|---|
3054 | 3054 |
return 0 |
3055 | 3055 |
fi |
3056 | 3056 | |
3057 |
h_api="$(_findHook "$d" httpapi "$_currentRoot")" |
|
3058 |
_debug h_api "$h_api" |
|
3059 |
if [ "$h_api" ]; then |
|
3060 |
_info "Found domain http api file: $h_api" |
|
3061 |
( |
|
3062 |
if ! . "$h_api"; then |
|
3063 |
_err "Load file $h_api error. Please check your api file and try again." |
|
3064 |
return 1 |
|
3057 |
if [ "$vtype" = "$VTYPE_HTTP" ]; then |
|
3058 |
h_api="$(_findHook "$d" httpapi "$_currentRoot")" |
|
3059 |
_debug h_api "$h_api" |
|
3060 |
if [ "$h_api" ]; then |
|
3061 |
_info "Found domain http api file: $h_api" |
|
3062 |
( |
|
3063 |
if ! . "$h_api"; then |
|
3064 |
_err "Load file $h_api error. Please check your api file and try again." |
|
3065 |
return 1 |
|
3066 |
fi |
|
3067 | ||
3068 |
rmcommand="${_currentRoot}_rm" |
|
3069 |
if ! _exists "$rmcommand"; then |
|
3070 |
_err "It seems that your api file is not correct, it must have a function named: $rmcommand" |
|
3071 |
return 1 |
|
3072 |
fi |
|
3073 | ||
3074 |
if ! $rmcommand "$__domain" "$3"; then |
|
3075 |
_err "Error rm webroot api for domain:$__webroot" |
|
3076 |
return 1 |
|
3077 |
fi |
|
3078 |
) |
|
3065 | 3079 |
fi |
3066 | 3080 | |
3067 |
rmcommand="${_currentRoot}_rm" |
|
3068 |
if ! _exists "$rmcommand"; then |
|
3069 |
_err "It seems that your api file is not correct, it must have a function named: $rmcommand" |
|
3070 |
return 1 |
|
3071 |
fi |
|
3072 | ||
3073 |
if ! $rmcommand "$__domain" "$3"; then |
|
3074 |
_err "Error rm webroot api for domain:$__webroot" |
|
3075 |
return 1 |
|
3076 |
fi |
|
3077 |
) |
|
3078 | ||
3079 | 3081 |
else |
3080 | 3082 |
_rmpath="" |
3081 | 3083 |
if [ "$2" = '1' ]; then |