From 7b6e9387905427ba231991d0d8d94fb24ee1da02 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 3 Jul 2015 00:07:41 +0200 Subject: gnunet: bump source, improve packaging * fix two typos in Makefile * package transports seperately * enable all installed transports by default * use logfile so we don't stdio-choke gnunet-service-arm -> should use syslog instead... Signed-off-by: Daniel Golle --- net/gnunet/files/gnunet.init | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'net/gnunet/files/gnunet.init') diff --git a/net/gnunet/files/gnunet.init b/net/gnunet/files/gnunet.init index 66e2600d4..3d9fc1875 100644 --- a/net/gnunet/files/gnunet.init +++ b/net/gnunet/files/gnunet.init @@ -8,6 +8,7 @@ USE_PROCD=1 PROG=/usr/lib/gnunet/libexec/gnunet-service-arm GNUNET_HOME=/var/run/gnunet +LOGFILE=$GNUNET_HOME/gnunet.log CONFIGFILE=$GNUNET_HOME/gnunet.conf SUID_ROOT_HELPERS="exit nat-server nat-client transport-bluetooth transport-wlan vpn" @@ -37,10 +38,20 @@ prepare_config() { touch $CONFIGFILE chown root:gnunet $CONFIGFILE chmod 0640 $CONFIGFILE - gnunet-config -c /tmp/run/gnunet/gnunet.conf -s PATHS -o GNUNET_HOME -V $GNUNET_HOME + gnunet-config -c $CONFIGFILE -s PATHS -o GNUNET_HOME -V $GNUNET_HOME + # enable gns2dns service defaultservices=$( gnunet-config -c /tmp/run/gnunet/gnunet.conf -s arm -o DEFAULTSERVICES ) - defaultservices="$defaultservices gns2dns" - gnunet-config -c /tmp/run/gnunet/gnunet.conf -s arm -o DEFAULTSERVICES -V "$defaultservices" + defaultservices="$defaultservices dns2gns" + # enable all installed transport plugins + gnunet-config -c $CONFIGFILE -s arm -o DEFAULTSERVICES -V "$defaultservices" + transport_plugins=$(gnunet-config -c $CONFIGFILE -s transport -o PLUGINS) + for transplug in /usr/lib/gnunet/libgnunet_plugin_transport_*.so; do + transplug=$( echo $transplug | + sed -ne 's!^.*_transport_\(.*\)\.so$!\1!p' ) + [ -n "$( echo $transport_plugins | grep $transplug )" ] || + transport_plugins="$transport_plugins $transplug" + done + gnunet-config -c $CONFIGFILE -s transport -o PLUGINS -V "$transport_plugins" } start_service() { @@ -49,7 +60,7 @@ start_service() { procd_open_instance procd_set_param user gnunet - procd_set_param command $PROG -c $CONFIGFILE + procd_set_param command $PROG -c $CONFIGFILE -l $LOGFILE procd_set_param respawn procd_close_instance } -- cgit v1.2.3