View | Details | Raw Unified | Return to bug 37917
Collapse All | Expand All

(-)squid24/Makefile (-1 / +4 lines)
Lines 95-100 Link Here
95
95
96
post-extract:
96
post-extract:
97
	@${PERL} -pi -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
97
	@${PERL} -pi -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
98
	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/squid.sh \
99
		> ${WRKSRC}/squid.sh
100
98
101
99
post-install:
102
post-install:
100
#	I don't think many people use the pinger nowadays, and if you
103
#	I don't think many people use the pinger nowadays, and if you
Lines 117-123 Link Here
117
	${CHOWN} nobody:nogroup ${PREFIX}/squid/cache
120
	${CHOWN} nobody:nogroup ${PREFIX}/squid/cache
118
	@if [ ! -f ${PREFIX}/etc/rc.d/squid.sh ]; then \
121
	@if [ ! -f ${PREFIX}/etc/rc.d/squid.sh ]; then \
119
		${ECHO} "Installing ${PREFIX}/etc/rc.d/squid.sh startup file."; \
122
		${ECHO} "Installing ${PREFIX}/etc/rc.d/squid.sh startup file."; \
120
		${INSTALL_SCRIPT} -m 751 ${FILESDIR}/squid.sh ${PREFIX}/etc/rc.d/squid.sh; \
123
		${INSTALL_SCRIPT} -m 751 ${WRKSRC}/squid.sh ${PREFIX}/etc/rc.d/squid.sh; \
121
	fi
124
	fi
122
125
123
.include <bsd.port.mk>
126
.include <bsd.port.mk>
(-)squid24/files/squid.sh (-9 / +7 lines)
Lines 1-25 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
2
3
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
4
    echo "$0: Cannot determine the PREFIX" >&2
5
    exit 1
6
fi
7
8
case "$1" in
3
case "$1" in
9
start)
4
start)
10
	if [ -x ${PREFIX}/sbin/squid -a -f ${PREFIX}/etc/squid/squid.conf ]; then
5
	if [ -x %%PREFIX%%/sbin/squid -a -f %%PREFIX%%/etc/squid/squid.conf ]; then
11
		(cd /${PREFIX}/squid/logs; ${PREFIX}/sbin/squid >/dev/null 2>&1 &) ; echo -n ' squid'
6
		(cd /%%PREFIX%%/squid/logs; %%PREFIX%%/sbin/squid >/dev/null 2>&1 &) ; echo -n ' squid'
12
	fi
7
	fi
13
	;;
8
	;;
14
stop)
9
stop)
15
		${PREFIX}/sbin/squid -k shutdown 2>&1
10
		%%PREFIX%%/sbin/squid -k shutdown 2>&1
16
		# Uncomment this if you'd like the system to (attempt to
11
		# Uncomment this if you'd like the system to (attempt to
17
		# wait for) squid to shut down cleanly
12
		# wait for) squid to shut down cleanly
18
		#echo "Sleeping for 45 seconds to allow squid to shutdown.."
13
		#echo "Sleeping for 45 seconds to allow squid to shutdown.."
19
		#sleep 45 
14
		#sleep 45 
20
	;;
15
	;;
16
restart)
17
		%%PREFIX%%/sbin/squid -k reconfigure
18
	;;
21
*)
19
*)
22
	echo "Usage: `basename $0` {start|stop}" >&2
20
	echo "Usage: `basename $0` {start|stop|restart}" >&2
23
	;;
21
	;;
24
esac
22
esac

Return to bug 37917