opt/squid/squid

43 lines
781 B
Plaintext
Raw Normal View History

2006-02-23 16:26:10 +01:00
#!/bin/sh
#
# /etc/rc.d/squid: start/stop squid daemon
#
SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/squid
PID=/var/run/squid.pid
OPTS="-Y"
2012-10-07 10:46:02 +02:00
2006-02-23 16:26:10 +01:00
case $1 in
start)
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
2006-02-23 16:26:10 +01:00
;;
stop)
$SSD --stop --retry 10 --pidfile $PID --signal INT
;;
shutdown)
$SSD --stop --retry 60 --pidfile $PID --signal TERM
2006-02-23 16:26:10 +01:00
;;
restart)
$0 stop
$0 start
;;
reload)
$SSD --stop --pidfile $PID --signal HUP
;;
status)
$SSD --status --pidfile $PID
case $? in
2015-04-03 12:01:43 +02:00
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
2006-02-23 16:26:10 +01:00
*)
echo "usage: $0 [start|stop|shutdown|restart|reload|status]"
2006-02-23 16:26:10 +01:00
;;
esac
# End of file