#!/bin/sh # # Automatically created by gnunet-setup # PIDFILE=/var/run/gnunetd/pid APPNAME=GNUnet case "$1" in start) echo -n "Starting $APPNAME: " /usr/local/bin/gnunetd echo ok || echo failed ;; stop) echo -n "Stopping $APPNAME: " kill `cat $PIDFILE` echo ok || echo failed ;; reload) echo -n "Reloading $APPNAME: " kill -HUP `cat $PIDFILE` echo ok || echo failed ;; restart|force-reload) echo "Restarting $APPNAME..." $0 stop sleep 1 $0 start ;; *) echo "Usage: /etc/init.d//gnunetd {start|stop|reload|restart|force-reload}" >&2 exit 1 ;; esac exit 0