summaryrefslogtreecommitdiff
path: root/www/squid24
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2003-06-27 04:30:46 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2003-06-27 04:30:46 +0000
commitf432bf45790258c32f866772a350f3bee293177b (patch)
tree2251cd3771b971b1fca3a693d6d35ab2dde58b66 /www/squid24
parentAllocate MAXPATHLEN size for filename manipulation to avoid risk (diff)
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/37917
maintainer/commiter timeout (1 year)
Notes
Notes: svn path=/head/; revision=83714
Diffstat (limited to 'www/squid24')
-rw-r--r--www/squid24/Makefile4
-rw-r--r--www/squid24/files/squid.sh10
2 files changed, 8 insertions, 6 deletions
diff --git a/www/squid24/Makefile b/www/squid24/Makefile
index ccef4080c89b..f67d1c20643f 100644
--- a/www/squid24/Makefile
+++ b/www/squid24/Makefile
@@ -102,6 +102,8 @@ MAKEFILE= makefile
post-extract:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
${WRKSRC}/configure
+ @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/squid.sh \
+ > ${WRKSRC}/squid.sh
post-install:
# I don't think many people use the pinger nowadays, and if you
@@ -128,7 +130,7 @@ post-install:
fi
@if [ ! -f ${PREFIX}/etc/rc.d/squid.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/squid.sh startup file."; \
- ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/squid.sh ${PREFIX}/etc/rc.d/squid.sh; \
+ ${INSTALL_SCRIPT} -m 751 ${WRKSRC}/squid.sh ${PREFIX}/etc/rc.d/squid.sh; \
fi
.include <bsd.port.mk>
diff --git a/www/squid24/files/squid.sh b/www/squid24/files/squid.sh
index 40f655b04f27..20f9f6c6c23c 100644
--- a/www/squid24/files/squid.sh
+++ b/www/squid24/files/squid.sh
@@ -1,9 +1,6 @@
#!/bin/sh
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
+PREFIX=%%PREFIX%%
case "$1" in
start)
@@ -18,8 +15,11 @@ stop)
#echo "Sleeping for 45 seconds to allow squid to shutdown.."
#sleep 45
;;
+restart)
+ ${PREFIX}/sbin/squid -k reconfigure
+ ;;
*)
- echo "Usage: `basename $0` {start|stop}" >&2
+ echo "Usage: `basename $0` {start|stop|restart}" >&2
;;
esac