diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2002-04-22 03:26:12 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2002-04-22 03:26:12 +0000 |
commit | 995ac1fee45377100d877732d3296ef6566d646c (patch) | |
tree | 4ace8709085a970769c652fcd507ab52ec080344 /www/apache13 | |
parent | 48fe32279db74f3587b487976822cb261f343199 (diff) | |
download | ports-995ac1fee45377100d877732d3296ef6566d646c.tar.gz ports-995ac1fee45377100d877732d3296ef6566d646c.zip |
Notes
Diffstat (limited to 'www/apache13')
-rw-r--r-- | www/apache13/Makefile | 6 | ||||
-rw-r--r-- | www/apache13/files/apache.sh | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/www/apache13/Makefile b/www/apache13/Makefile index a47e51a8269a..7ec2992eef2f 100644 --- a/www/apache13/Makefile +++ b/www/apache13/Makefile @@ -72,13 +72,17 @@ CONFIGURE_ENV= OPTIM='${OPTIM}' LD_SHLIB='${CC}' MAN1= dbmmanage.1 htdigest.1 htpasswd.1 MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 +post-extract: + @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/apache.sh \ + > ${WRKSRC}/apache.sh + pre-install: PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL post-install: @if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \ ${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \ - ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \ + ${INSTALL_SCRIPT} -m 751 ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \ fi @${CAT} ${PKGMESSAGE} diff --git a/www/apache13/files/apache.sh b/www/apache13/files/apache.sh index ca4321814e5a..da657b5307ba 100644 --- a/www/apache13/files/apache.sh +++ b/www/apache13/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 start > /dev/null && echo -n ' apache' + [ -x %%PREFIX%%/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /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 |