mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user