|
@ -996,11 +996,11 @@ _setApache() { |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
#test the conf first |
|
|
#test the conf first |
|
|
_info "Checking if there is an error in your apache config file before we start." |
|
|
|
|
|
|
|
|
_info "Checking if there is an error in the apache config file before starting." |
|
|
_msg="$(apachectl -t 2>&1 )" |
|
|
_msg="$(apachectl -t 2>&1 )" |
|
|
if [ "$?" != "0" ] ; then |
|
|
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 "Sorry, apache config file has error, please fix it first, then try again." |
|
|
|
|
|
_err "Don't worry, there is nothing changed to your system." |
|
|
_err "$_msg" |
|
|
_err "$_msg" |
|
|
return 1; |
|
|
return 1; |
|
|
else |
|
|
else |
|
@ -1010,7 +1010,7 @@ _setApache() { |
|
|
#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 |
|
|
_err "Can not backup apache config file, so abort. Don't worry, your apache config is not changed." |
|
|
|
|
|
|
|
|
_err "Can not backup apache config file, so abort. Don't worry, the apache config is not changed." |
|
|
_err "This might be a bug of $PROJECT_NAME , pleae report issue: $PROJECT" |
|
|
_err "This might be a bug of $PROJECT_NAME , pleae report issue: $PROJECT" |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
@ -1048,9 +1048,9 @@ Allow from all |
|
|
if [ "$?" != "0" ] ; then |
|
|
if [ "$?" != "0" ] ; then |
|
|
_err "Sorry, apache config error" |
|
|
_err "Sorry, apache config error" |
|
|
if _restoreApache ; then |
|
|
if _restoreApache ; then |
|
|
_err "We have restored your apache config file." |
|
|
|
|
|
|
|
|
_err "The apache config file is restored." |
|
|
else |
|
|
else |
|
|
_err "Sorry, we are not able to restore the config file, please contact me." |
|
|
|
|
|
|
|
|
_err "Sorry, The apache config file can not be restored, please report bug." |
|
|
fi |
|
|
fi |
|
|
return 1; |
|
|
return 1; |
|
|
fi |
|
|
fi |
|
|