From 80a0a7b5c598e62507eff8b6c043bd1cbae82d17 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 19 Apr 2016 18:36:15 +0800 Subject: [PATCH] minor: fix apachectl error message (#160) --- acme.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/acme.sh b/acme.sh index 74536ec2..49170ff5 100755 --- a/acme.sh +++ b/acme.sh @@ -871,6 +871,11 @@ _initpath() { _apachePath() { + if ! _exists apachectl ; then + _err "'apachecrl not found. It seems that apache is not installed, or you are not root user.'" + _err "Please use webroot mode to try again." + return 1 + fi httpdconfname="$(apachectl -V | grep SERVER_CONFIG_FILE= | cut -d = -f 2 | tr -d '"' )" if _startswith "$httpdconfname" '/' ; then httpdconf="$httpdconfname"