gnunet: fix things and use newer source version

- use newer source version from SVN
 - made it detect gnurl
 - added init script
 - added gnunet user

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle
2015-05-31 04:54:23 +02:00
parent eba7afcfb7
commit ce0b6a4554
3 changed files with 151 additions and 6 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2015 OpenWrt.org
START=50
STOP=10
USE_PROCD=1
PROG=/usr/bin/gnunet-arm
CONFIGFILE=/var/run/gnunet/gnunet.conf
start_service() {
if [ ! -e /var/run/gnunet ]; then
mkdir -p /var/run/gnunet
chmod 0750 /var/run/gnunet
chown gnunet:gnunet /var/run/gnunet
touch $CONFIGFILE
chown gnunet:gnunet $CONFIGFILE
chmod 0600 $CONFIGFILE
fi
procd_open_instance
procd_set_param user gnunet
procd_set_param command $PROG -c $CONFIGFILE -s -m
procd_set_param respawn
procd_close_instance
}
stop_service() {
procd_open_instance
procd_set_param user gnunet
procd_set_param command $PROG -c $CONFIGFILE -e
procd_close_instance
}