Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=ee80d9096f4634bbada02aec7efd2c5d03e8b066
commit ee80d9096f4634bbada02aec7efd2c5d03e8b066 Author: bouleetbil <bouleet...@frogdev.info> Date: Fri Sep 17 12:31:33 2010 +0000 squid-3.0.STABLE25-3-i686 *rewrite rc script diff --git a/source/network-extra/squid/FrugalBuild b/source/network-extra/squid/FrugalBuild index 4374f06..18fbda9 100644 --- a/source/network-extra/squid/FrugalBuild +++ b/source/network-extra/squid/FrugalBuild @@ -3,7 +3,7 @@ pkgname=squid pkgver=3.0.STABLE25 -pkgrel=2 +pkgrel=3 pkgdesc="Squid Web Proxy Cache" url="http://www.squid-cache.org/" depends=('openssl>=1.0.0' 'perl') @@ -15,7 +15,7 @@ up2date="lynx -dump http://www.squid-cache.org/Versions/|grep Stable -A 4|sed -n source=(http://www.squid-cache.org/Versions/v3/3.0/$pkgname-$pkgver.tar.bz2 \ rc.squid squid) sha1sums=('18306a6dc370930dfbea24674588053e62c13b97' \ - '7afef636bbe28f598c4c80e500babd776a3d0a2c' \ + 'f732ab92b6c301ac12cbb295e5c4b2e3bed36fb2' \ '53042dd86e482d4a6eff9e34ecb01352439c5026') build() diff --git a/source/network-extra/squid/rc.squid b/source/network-extra/squid/rc.squid index 4ae1375..e67a509 100644 --- a/source/network-extra/squid/rc.squid +++ b/source/network-extra/squid/rc.squid @@ -4,13 +4,19 @@ # rc.squid for Frugalware # distributed under GPL License -. /etc/rc.d/rc.functions - # chkconfig: 2345 85 15 # description: Start/stop the squid web proxy cache -if [ "$1" = "stop" ]; then - stop "$stopsquid" +source /lib/initscripts/functions + +TEXTDOMAIN=squid +TEXTDOMAINDIR=/lib/initscripts/messages +actions=(reload restart status start stop) +daemon=$"Squid web proxy cache" + +rc_stop() +{ + stop_msg squid -k shutdown sleep 1 if [ -f /var/squid/log/squid.pid ] ; then @@ -27,13 +33,21 @@ if [ "$1" = "stop" ]; then done fi ok $? -elif [ "$1" = "restart" ]; then - "$0" stop +} +rc_restart() +{ + rc_stop sleep 1 - "$0" start -elif [ "$1" = "reload" ]; then + rc_start +} + +rc_reload() +{ squid -k reconfigure -else # start +} +rc_start() +{ + start_msg if [ ! -f /var/cache/squid/swap.state ]; then start "$createcache" squid -z 2>/dev/null 1>&2 @@ -42,4 +56,6 @@ else # start start "$startsquid" squid -D -sYC ok $? -fi +} + +rc_exec $1 _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git