|
@@ -8,15 +8,15 @@ USE_PROCD=1
|
8
|
8
|
PROG=/usr/lib/gnunet/libexec/gnunet-service-arm
|
9
|
9
|
|
10
|
10
|
GNUNET_HOME=/var/run/gnunet
|
11
|
|
-LOGFILE=$GNUNET_HOME/gnunet.log
|
|
11
|
+# LOGFILE=$GNUNET_HOME/gnunet.log
|
12
|
12
|
CONFIGFILE=$GNUNET_HOME/gnunet.conf
|
13
|
13
|
SUID_ROOT_HELPERS="exit nat-server nat-client transport-bluetooth transport-wlan vpn"
|
14
|
14
|
|
15
|
15
|
chmodown_execbin() {
|
16
|
16
|
execname=/usr/lib/gnunet/libexec/gnunet-$1
|
17
|
17
|
if [ -x $execname ]; then
|
18
|
|
- chmod $2 $execname
|
19
|
18
|
[ "$3" ] && chown $3 $execname
|
|
19
|
+ chmod $2 $execname
|
20
|
20
|
fi
|
21
|
21
|
}
|
22
|
22
|
|
|
@@ -26,7 +26,7 @@ fix_libexec_permissions() {
|
26
|
26
|
chmodown_execbin helper-$helper u+s
|
27
|
27
|
done
|
28
|
28
|
chmodown_execbin helper-dns 4750 root:gnunetdns
|
29
|
|
- chmodown_execbin service-dns 2750 root:gnunetdns
|
|
29
|
+ chmodown_execbin service-dns 2750 gnunet:gnunetdns
|
30
|
30
|
|
31
|
31
|
touch /usr/share/gnunet/.permfix
|
32
|
32
|
}
|
|
@@ -38,7 +38,7 @@ prepare_config() {
|
38
|
38
|
chmod 0750 $GNUNET_HOME
|
39
|
39
|
fi
|
40
|
40
|
touch $CONFIGFILE
|
41
|
|
- chown root:gnunet $CONFIGFILE
|
|
41
|
+ chown gnunet:gnunet $CONFIGFILE
|
42
|
42
|
chmod 0640 $CONFIGFILE
|
43
|
43
|
gnunet-config -c $CONFIGFILE -s PATHS -o GNUNET_HOME -V $GNUNET_HOME
|
44
|
44
|
|
|
@@ -66,6 +66,10 @@ prepare_config() {
|
66
|
66
|
done
|
67
|
67
|
gnunet-config -c $CONFIGFILE -s transport -o PLUGINS -V "$transport_plugins"
|
68
|
68
|
|
|
69
|
+ # do not touch sysctl, iptables and routing
|
|
70
|
+ gnunet-config -c $CONFIGFILE -s dns -o SKIP_ROUTING_SETUP -V YES
|
|
71
|
+ gnunet-config -c $CONFIGFILE -s exit -o EXIT_IFNAME -V ''
|
|
72
|
+
|
69
|
73
|
# apply config from UCI
|
70
|
74
|
_gnunet_section=""
|
71
|
75
|
config_cb()
|
|
@@ -95,7 +99,8 @@ start_service() {
|
95
|
99
|
|
96
|
100
|
procd_open_instance
|
97
|
101
|
procd_set_param user gnunet
|
98
|
|
- procd_set_param command $PROG -c $CONFIGFILE -l $LOGFILE
|
|
102
|
+ procd_set_param command $PROG -c $CONFIGFILE
|
|
103
|
+ [ "$LOGFILE" ] && procd_append_param command -l $LOGFILE
|
99
|
104
|
procd_set_param respawn
|
100
|
105
|
procd_close_instance
|
101
|
106
|
}
|