mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-25 22:51:39 +00:00
parent
57e58ce76c
commit
5be1449db5
34
acme.sh
34
acme.sh
@ -1808,22 +1808,28 @@ _apachePath() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
httpdconfname="$($_APACHECTL -V | grep SERVER_CONFIG_FILE= | cut -d = -f 2 | tr -d '"' )"
|
if [ "$APACHE_HTTPD_CONF" ] ; then
|
||||||
_debug httpdconfname "$httpdconfname"
|
_saveaccountconf APACHE_HTTPD_CONF "$APACHE_HTTPD_CONF"
|
||||||
|
httpdconf="$APACHE_HTTPD_CONF"
|
||||||
if [ -z "$httpdconfname" ] ; then
|
|
||||||
_err "Can not read apache config file."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if _startswith "$httpdconfname" '/' ; then
|
|
||||||
httpdconf="$httpdconfname"
|
|
||||||
httpdconfname="$(basename $httpdconfname)"
|
httpdconfname="$(basename $httpdconfname)"
|
||||||
else
|
else
|
||||||
httpdroot="$($_APACHECTL -V | grep HTTPD_ROOT= | cut -d = -f 2 | tr -d '"' )"
|
httpdconfname="$($_APACHECTL -V | grep SERVER_CONFIG_FILE= | cut -d = -f 2 | tr -d '"' )"
|
||||||
_debug httpdroot "$httpdroot"
|
_debug httpdconfname "$httpdconfname"
|
||||||
httpdconf="$httpdroot/$httpdconfname"
|
|
||||||
httpdconfname="$(basename $httpdconfname)"
|
if [ -z "$httpdconfname" ] ; then
|
||||||
|
_err "Can not read apache config file."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if _startswith "$httpdconfname" '/' ; then
|
||||||
|
httpdconf="$httpdconfname"
|
||||||
|
httpdconfname="$(basename $httpdconfname)"
|
||||||
|
else
|
||||||
|
httpdroot="$($_APACHECTL -V | grep HTTPD_ROOT= | cut -d = -f 2 | tr -d '"' )"
|
||||||
|
_debug httpdroot "$httpdroot"
|
||||||
|
httpdconf="$httpdroot/$httpdconfname"
|
||||||
|
httpdconfname="$(basename $httpdconfname)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
_debug httpdconf "$httpdconf"
|
_debug httpdconf "$httpdconf"
|
||||||
_debug httpdconfname "$httpdconfname"
|
_debug httpdconfname "$httpdconfname"
|
||||||
|
Loading…
Reference in New Issue
Block a user