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