diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-16 18:09:48 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-16 18:09:48 +0900 |
commit | 4ca81ff1a80980044542d69c53ebb85c64d2435b (patch) | |
tree | b58f3dba84b3d4225a98a3d0f53f366216247510 /contrib/packages | |
parent | 0efa2d4d007cc24fcf087d8f61e2b879a89cf0a5 (diff) | |
download | gnunet-4ca81ff1a80980044542d69c53ebb85c64d2435b.tar.gz gnunet-4ca81ff1a80980044542d69c53ebb85c64d2435b.zip |
PACKAGES: Update fedora configurations and scripts
Diffstat (limited to 'contrib/packages')
-rw-r--r-- | contrib/packages/fedora/10-dns2gns.sh | 52 | ||||
-rw-r--r-- | contrib/packages/fedora/gnunet-system.conf | 12 |
2 files changed, 50 insertions, 14 deletions
diff --git a/contrib/packages/fedora/10-dns2gns.sh b/contrib/packages/fedora/10-dns2gns.sh index a27046548..82e97eeed 100644 --- a/contrib/packages/fedora/10-dns2gns.sh +++ b/contrib/packages/fedora/10-dns2gns.sh | |||
@@ -2,18 +2,42 @@ | |||
2 | interface=$1 | 2 | interface=$1 |
3 | status=$2 | 3 | status=$2 |
4 | 4 | ||
5 | if [ "$interface" = "eth0" ]; then | 5 | do_it=$(gnunet-config -s dns2gns -o ENABLE_RESOLVECTL_NMDISPATCHER -c /etc/gnunet.conf) |
6 | case $status in | 6 | if [ $? != 0 ]; then |
7 | up) | 7 | exit 1 |
8 | if nc -u -z 127.0.0.1 5353; then | 8 | fi |
9 | # Note: We add quad 9 here as a fallback in case our service is down. | 9 | if [ $do_it = "NO" ]; then |
10 | resolvectl dns $interface 127.0.0.1:5353 9.9.9.9 | 10 | echo "Setting DNS2GNS through resolvectl disabled." |
11 | elif | 11 | exit 1 |
12 | # Just in case DNS2GNS was already configured, revert to defaults | ||
13 | resolvectl revert $interface | ||
14 | fi | ||
15 | ;; | ||
16 | down) | ||
17 | ;; | ||
18 | esac | ||
19 | fi | 12 | fi |
13 | |||
14 | case $status in | ||
15 | up) | ||
16 | if nc -u -z 127.0.0.1 5353; then | ||
17 | # Note: We add quad 9 as a fallback in case our service is down. | ||
18 | dns2gns=$(gnunet-config -s dns2gns -o BIND_TO) | ||
19 | if [ $? != 0 ]; then | ||
20 | exit 1 | ||
21 | fi | ||
22 | dns2gns6=$(gnunet-config -s dns2gns -o BIND_TO6) | ||
23 | if [ $? != 0 ]; then | ||
24 | exit 1 | ||
25 | fi | ||
26 | port=$(gnunet-config -s dns2gns -o PORT) | ||
27 | if [ $? != 0 ]; then | ||
28 | exit 1 | ||
29 | fi | ||
30 | olddns=$(resolvectl status $interface | grep "DNS Servers" | cut -d':' -f2-) | ||
31 | if [ $? == 0 ]; then | ||
32 | #echo "Setting to $dns2gns:$port [$dns2gns6]:$port $olddns 9.9.9.9" | ||
33 | #resolvectl dns $interface $dns2gns:$port [$dns2gns6]:$port $olddns 9.9.9.9 | ||
34 | echo "Setting to $dns2gns:$port [$dns2gns6]:$port" | ||
35 | resolvectl dns $interface $dns2gns:$port [$dns2gns6]:$port | ||
36 | else | ||
37 | exit 1 | ||
38 | fi | ||
39 | fi | ||
40 | ;; | ||
41 | down) | ||
42 | ;; | ||
43 | esac | ||
diff --git a/contrib/packages/fedora/gnunet-system.conf b/contrib/packages/fedora/gnunet-system.conf new file mode 100644 index 000000000..a0b99dfeb --- /dev/null +++ b/contrib/packages/fedora/gnunet-system.conf | |||
@@ -0,0 +1,12 @@ | |||
1 | [path] | ||
2 | GNUNET_HOME = /var/lib/gnunet/ | ||
3 | GNUNET_DATA_HOME = /var/lib/gnunet/data/ | ||
4 | GNUNET_RUNTIME_DIR = /var/run/gnunet/ | ||
5 | |||
6 | [arm] | ||
7 | START_SYSTEM_SERVICES = YES | ||
8 | START_USER_SERVICES = NO | ||
9 | OPTIONS = -l /var/log/gnunet.log | ||
10 | |||
11 | [dns2gns] | ||
12 | ENABLE_RESOLVECTL_NMDISPATCHER = YES | ||