/[gentoo-x86]/net-p2p/gift/files/gift.initd
Gentoo

Contents of /net-p2p/gift/files/gift.initd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Wed Apr 19 02:10:48 2006 UTC (8 years, 3 months ago) by squinky86
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -1 lines
Fix init script to start gift completely before checking if gift is running. #116082
(Portage version: 2.1_pre7-r5)

1 #!/sbin/runscript
2 # Copyright 1999-2004 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header: /var/cvsroot/gentoo-x86/net-p2p/gift/files/gift.initd,v 1.6 2005/09/16 23:32:20 mkay Exp $
5
6 depend() {
7 need net
8 }
9
10 start() {
11 ebegin "Starting giFTd"
12 start-stop-daemon --quiet --start -c ${USER} --make-pidfile \
13 --pidfile /var/run/giftd.pid --exec /usr/bin/giftd \
14 --nicelevel ${NICE} -- \
15 --local-dir=${LOCAL_DIR} &>${LOG} &
16 result=$?
17 sleep 1
18 [ -z "`pgrep -u ${USER} giftd`" ] && result=1
19 if [ $result -eq 1 ]; then
20 eerror "Failed to start gift. Check ${LOG} for more information"
21 fi;
22 eend $result
23 }
24
25 stop() {
26 ebegin "Stopping giFTd - please wait"
27 start-stop-daemon --stop --quiet --pidfile /var/run/giftd.pid
28 eend $?
29 }
30
31 restart() {
32 svc_stop
33 sleep 10
34 svc_start
35 }

  ViewVC Help
Powered by ViewVC 1.1.20