Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
5fc5016d
Commit
5fc5016d
authored
Jun 15, 2016
by
neil
Browse files
minor, fix apache error message.
parent
22e7ba3f
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
5fc5016d
...
...
@@ -995,6 +995,18 @@ _setApache() {
return
1
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
_debug
"Backup apache config file"
"
$httpdconf
"
if
!
cp
"
$httpdconf
"
"
$APACHE_CONF_BACKUP_DIR
/"
;
then
...
...
@@ -1032,10 +1044,14 @@ Allow from all
"
>>
"
$httpdconf
"
fi
if
!
apachectl
-t
>
/dev/null 2>&1
;
then
_err
"Sorry, apache config error, please contact me."
_restoreApache
_msg
=
"
$(
apachectl
-t
2>&1
)
"
if
[
"
$?
"
!=
"0"
]
;
then
_err
"Sorry, apache config error"
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
;
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment