summaryrefslogtreecommitdiff
path: root/www/apache13-modssl/files/apache.sh
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2002-04-19 17:45:25 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2002-04-19 17:45:25 +0000
commit4b4f4ae757eaf71068db696a5a165f3bfef7638e (patch)
treec2ff9cc3c74d81637115725f79e240931df973c3 /www/apache13-modssl/files/apache.sh
parentadd fribidi 0.10.3 (diff)
Make startscript apache.sh PREFIX aware at install time,
so it can be called within an path or dir. e.g. in: /usr/local/etc/rc.local/apache.sh
Notes
Notes: svn path=/head/; revision=57888
Diffstat (limited to '')
-rw-r--r--www/apache13-modssl/files/apache.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/www/apache13-modssl/files/apache.sh b/www/apache13-modssl/files/apache.sh
index 8e6e38810fa8..34eb4cd3c31c 100644
--- a/www/apache13-modssl/files/apache.sh
+++ b/www/apache13-modssl/files/apache.sh
@@ -1,16 +1,11 @@
#!/bin/sh
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
-
case "$1" in
start)
- [ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl startssl > /dev/null && echo -n ' apache'
+ [ -x %%PREFIX%%/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl startssl > /dev/null && echo -n ' apache'
;;
stop)
- [ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null && echo -n ' apache'
+ [ -r /var/run/httpd.pid ] && %%PREFIX%%/sbin/apachectl stop > /dev/null && echo -n ' apache'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2