Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
8f63baf7
Commit
8f63baf7
authored
May 21, 2016
by
neil
Browse files
fix centos apache issue
parent
78768e98
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
8f63baf7
...
@@ -924,9 +924,10 @@ _apachePath() {
...
@@ -924,9 +924,10 @@ _apachePath() {
httpdroot
=
"
$(
apachectl
-V
|
grep
HTTPD_ROOT
=
|
cut
-d
=
-f
2 |
tr
-d
'"'
)
"
httpdroot
=
"
$(
apachectl
-V
|
grep
HTTPD_ROOT
=
|
cut
-d
=
-f
2 |
tr
-d
'"'
)
"
_debug httpdroot
"
$httpdroot
"
_debug httpdroot
"
$httpdroot
"
httpdconf
=
"
$httpdroot
/
$httpdconfname
"
httpdconf
=
"
$httpdroot
/
$httpdconfname
"
httpdconfname
=
"
$(
basename
$httpdconfname
)
"
fi
fi
_debug httpdconf
"
$httpdconf
"
_debug httpdconf
"
$httpdconf
"
_debug httpdconfname
"
$httpdconfname
"
if
[
!
-f
"
$httpdconf
"
]
;
then
if
[
!
-f
"
$httpdconf
"
]
;
then
_err
"Apache Config file not found"
"
$httpdconf
"
_err
"Apache Config file not found"
"
$httpdconf
"
return
1
return
1
...
@@ -967,7 +968,11 @@ _setApache() {
...
@@ -967,7 +968,11 @@ _setApache() {
#backup the conf
#backup the conf
_debug
"Backup apache config file"
"
$httpdconf
"
_debug
"Backup apache config file"
"
$httpdconf
"
cp
"
$httpdconf
"
"
$APACHE_CONF_BACKUP_DIR
/"
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
"This might be a bug of
$PROJECT_NAME
, pleae report issue:
$PROJECT
"
return
1
fi
_info
"JFYI, Config file
$httpdconf
is backuped to
$APACHE_CONF_BACKUP_DIR
/
$httpdconfname
"
_info
"JFYI, Config file
$httpdconf
is backuped to
$APACHE_CONF_BACKUP_DIR
/
$httpdconfname
"
_info
"In case there is an error that can not be restored automatically, you may try restore it yourself."
_info
"In case there is an error that can not be restored automatically, you may try restore it yourself."
_info
"The backup file will be deleted on sucess, just forget it."
_info
"The backup file will be deleted on sucess, just forget it."
...
...
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