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