#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
##
##  rc.squid -- Run-Commands for Squid
##

%config
    squid_enable="yes"

%start -p 200 -u root
    opServiceEnabled squid || exit 0
    @l_prefix@/sbin/squid -D

%stop -p 200 -u root
    opServiceEnabled squid || exit 0
    kill -TERM `cat @l_prefix@/var/squid/logs/squid.pid`

%restart -u root
    opServiceEnabled squid || exit 0
    kill -TERM `cat @l_prefix@/var/squid/logs/squid.pid`
    sleep 2
    @l_prefix@/sbin/squid -D

%reload -u root
    opServiceEnabled squid || exit 0
    kill -HUP `cat @l_prefix@/var/squid/logs/squid.pid`

