aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2003-06-27 12:30:46 +0800
committerdinoex <dinoex@FreeBSD.org>2003-06-27 12:30:46 +0800
commiteb272cde515bc807968bda8efa99b45c6f6acb59 (patch)
tree4bcbed351a47740593cb64d0871e536e3e22dad2
parent5180d1a6e443deb8b675f35cead08fe057bc7256 (diff)
downloadfreebsd-ports-gnome-eb272cde515bc807968bda8efa99b45c6f6acb59.tar.gz
freebsd-ports-gnome-eb272cde515bc807968bda8efa99b45c6f6acb59.tar.zst
freebsd-ports-gnome-eb272cde515bc807968bda8efa99b45c6f6acb59.zip
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/37917
maintainer/commiter timeout (1 year)
-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