diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
commit | 7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch) | |
tree | 1684924656132935256e034f35f92abee6623265 /net-p2p/gnunet/files/gnunet-2 |
Added ebuilds for kogaion desktop
Diffstat (limited to 'net-p2p/gnunet/files/gnunet-2')
-rw-r--r-- | net-p2p/gnunet/files/gnunet-2 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/net-p2p/gnunet/files/gnunet-2 b/net-p2p/gnunet/files/gnunet-2 new file mode 100644 index 00000000..54e73a4c --- /dev/null +++ b/net-p2p/gnunet/files/gnunet-2 @@ -0,0 +1,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 +} |