Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
slackbuilds/n/squid/rc.squid

33 lines
576 B

#!/bin/sh
DAEMON=/usr/sbin/squid
PIDFILE=/var/run/squid.pid
CACHEDIR=/var/spool/squid
case "$1" in
start)
if [ -d "$CACHEDIR" -a ! -d "$CACHEDIR/00" ]; then
$DAEMON -z
fi
$DAEMON -s -D -C
;;
stop)
$DAEMON -k shutdown
;;
restart)
$DAEMON -k reconfigure
;;
status)
if [ -f $PIDFILE ]; then
echo "squid is running (`cat $PIDFILE`)"
fi
;;
*)
echo "Usage: `basename $0` {start|stop|restart|status}" 1>&2
exit 1
;;
esac