#!/sbin/runscript # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 depend() { need net } start() { if [ ! -f "${GN_CONF}" ]; then eerror "You must create the config file first." return 1 fi ebegin "Starting GNUnet" su -s /bin/sh ${GN_USER} -c \ "/usr/bin/gnunet-arm -q -c ${GN_CONF} -s" eend $? "Failed to start GNUnet" } stop() { ebegin "Stopping GNUnet" su -s /bin/sh ${GN_USER} -c "/usr/bin/gnunet-arm -q -c ${GN_CONF} -e" eend $? "Failed to stop GNUnet" } restart() { ebegin "Stopping GNUnet" su -s /bin/sh ${GN_USER} -c \ "/usr/bin/gnunet-arm -q -c ${GN_CONF} -r" eend $? "Failed to restart GNUnet" }