blob: 54e73a4c4d06e136127adb6df16f4145525d0faa (
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
|
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2
depend() {
need net
}
start() {
if ! test -f "/etc/gnunetd.conf"; then
eerror "You must create /etc/gnunetd.conf file first"
return 1
fi
ebegin "Starting GNUnet"
# -u username, -c path to gnunet.conf file
start-stop-daemon --start --quiet --background --exec /usr/bin/gnunetd \
-- -u gnunet -c /etc/gnunetd.conf
eend $? "Failed to start GNUnet"
}
stop() {
ebegin "Stopping GNUnet"
killall gnunetd
eend $? "Failed to stop GNUnet"
}
restart() {
svc_stop
sleep 3
svc_start
}
|