freebsd-ports/Tools/portbuild/scripts/flushsquid
Mark Linimon ae733423e0 Generalize the packge building scripts to be able to be run on more than
one 'head' node, rather than just pointyhat itself.

Constants are factored out into installation-specific files known as
portbuild/conf/server.conf and portbuild/conf/client.conf.  There is
only one server.conf file.  Individual <arch> directories may have
their own client.conf files, or may symlink to ../conf/client.conf.

This first set of files only gets the *.conf files and some cleanup.

Feature safe:	yes
2010-06-25 22:49:56 +00:00

20 lines
501 B
Bash
Executable file

#!/bin/sh
# $FreeBSD$
# client script to be manually run to flush squid cache, whenever needed
# note: uname is not being overridden
arch=$(uname -m)
pb=/var/portbuild
. ${pb}/${arch}/client.conf
. ${pb}/${arch}/portbuild.conf
host=$(hostname)
test -f ${pb}/${arch}/portbuild.${host} && . ${pb}/${arch}/portbuild.${host}
if [ ! -z "${squid_dir}" ] ; then
/usr/local/etc/rc.d/squid stop
/usr/local/etc/rc.d/squid poll
echo "" > ${squid_dir}/cache/swap.state
/usr/local/etc/rc.d/squid start
fi