[tor-0.1.0.17-2-i686 voroskoi <[EMAIL PROTECTED]>**20060306220114 added rc.tor ] { addfile ./extra/source/network/tor/rc.tor hunk ./extra/source/network/tor/FrugalBuild 1 -# Last modified: Sat, 25 Feb 2006 20:14:04 +0100 +# Last modified: Mon, 06 Mar 2006 23:00:09 +0100 hunk ./extra/source/network/tor/FrugalBuild 8 -pkgrel=1 +pkgrel=2 hunk ./extra/source/network/tor/FrugalBuild 17 -source=($url/dist/tor-$pkgver.tar.gz) -sha1sums=('4df754374b5b14e6e9f96b88e694d4bb3deef4a5') +source=($url/dist/tor-$pkgver.tar.gz rc.$pkgname) +sha1sums=('4df754374b5b14e6e9f96b88e694d4bb3deef4a5' \ + 'f244ab60d53812c2025377898bb17f0534924783') hunk ./extra/source/network/tor/FrugalBuild 25 + Fexe /etc/rc.d/rc.$pkgname + Fmkdir /var/lib/tor + Fdirschown /var/lib/tor nobody nogroup hunk ./extra/source/network/tor/rc.tor 1 +#!/bin/bash + +# (c) 2006 Andras Voroskoi <[EMAIL PROTECTED]> +# rc.tor for Frugalware +# distributed under GPL License + +# chkconfig: 2345 83 08 +# description: Tor is a network of virtual tunnels that \ +# allows people and groups to improve their \ +# privacy and security on the Internet. + +source /lib/initscripts/functions +TEXTDOMAIN=tor +TEXTDOMAINDIR=/lib/initscripts/messages + +actions=(restart status start stop) +daemon="tor" + +pid="pidof tor 2> /dev/null" + +rc_start() +{ + start_msg + if [[ "$(eval $pid)" == "" ]] ; then + su - nobody -c "HOME=/var/lib/tor ${daemon} --runasdaemon 1" + retval=$? + ok ${retval} + else + ok 999 + fi +} + +rc_stop() +{ + stop_msg + if [[ "$(eval $pid)" != "" ]] ; then + killall ${daemon} + ok $? + else + ok 999 + fi +} + +rc_exec $1 } _______________________________________________ Frugalware-darcs mailing list Frugalware-darcs@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-darcs