mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-23 05:31:42 +00:00
minor, fix apache error message.
This commit is contained in:
parent
22e7ba3f7b
commit
5fc5016d2c
24
acme.sh
24
acme.sh
@ -995,6 +995,18 @@ _setApache() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#test the conf first
|
||||||
|
_info "Checking if there is an error in your apache config file before we start."
|
||||||
|
_msg="$(apachectl -t 2>&1 )"
|
||||||
|
if [ "$?" != "0" ] ; then
|
||||||
|
_err "Sorry, apache config has error, please fix it by yourself first, then try again."
|
||||||
|
_err "Don't worry, we have not made any changes to your system."
|
||||||
|
_err "$_msg"
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
_info "OK"
|
||||||
|
fi
|
||||||
|
|
||||||
#backup the conf
|
#backup the conf
|
||||||
_debug "Backup apache config file" "$httpdconf"
|
_debug "Backup apache config file" "$httpdconf"
|
||||||
if ! cp "$httpdconf" "$APACHE_CONF_BACKUP_DIR/" ; then
|
if ! cp "$httpdconf" "$APACHE_CONF_BACKUP_DIR/" ; then
|
||||||
@ -1032,10 +1044,14 @@ Allow from all
|
|||||||
" >> "$httpdconf"
|
" >> "$httpdconf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_msg="$(apachectl -t 2>&1 )"
|
||||||
if ! apachectl -t >/dev/null 2>&1; then
|
if [ "$?" != "0" ] ; then
|
||||||
_err "Sorry, apache config error, please contact me."
|
_err "Sorry, apache config error"
|
||||||
_restoreApache
|
if _restoreApache ; then
|
||||||
|
_err "We have restored your apache config file."
|
||||||
|
else
|
||||||
|
_err "Sorry, we are not able to restore the config file, please contact me."
|
||||||
|
fi
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user