aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/gnunet-gns-import.sh28
1 files changed, 24 insertions, 4 deletions
diff --git a/contrib/gnunet-gns-import.sh b/contrib/gnunet-gns-import.sh
index fd56119d3..21670a3ec 100755
--- a/contrib/gnunet-gns-import.sh
+++ b/contrib/gnunet-gns-import.sh
@@ -5,6 +5,11 @@
5LOCATION=$(which gnunet-config) 5LOCATION=$(which gnunet-config)
6if [ -z $LOCATION ] 6if [ -z $LOCATION ]
7then 7then
8 LOCATION="gnunet-config"
9fi
10$LOCATION --version &> /dev/null
11if test $? != 0
12then
8 echo "GNUnet command line tools not found, check environmental variables PATH and GNUNET_PREFIX" 13 echo "GNUnet command line tools not found, check environmental variables PATH and GNUNET_PREFIX"
9 exit 1 14 exit 1
10fi 15fi
@@ -54,11 +59,26 @@ gnunet-identity -e sks-zone -s fs-sks $options
54MASTER=`gnunet-identity -d $options | grep master-zone | awk '{print $3}'` 59MASTER=`gnunet-identity -d $options | grep master-zone | awk '{print $3}'`
55SHORT=`gnunet-identity -d $options | grep short-zone | awk '{print $3}'` 60SHORT=`gnunet-identity -d $options | grep short-zone | awk '{print $3}'`
56PRIVATE=`gnunet-identity -d $options | grep private-zone | awk '{print $3}'` 61PRIVATE=`gnunet-identity -d $options | grep private-zone | awk '{print $3}'`
62PIN=72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG
57 63
58# Link short and private zones into master zone 64# Link short and private zones into master zone
59gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE $options 65if (gnunet-namestore -z master-zone -D -n private -t PKEY | grep "PKEY: $PRIVATE" &>/dev/null)
60gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT $options 66then
67 :
68else
69 gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE $options
70fi
71if (gnunet-namestore -z master-zone -D -n short -t PKEY | grep "PKEY: $SHORT" &>/dev/null)
72then
73 :
74else
75 gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT $options
76fi
61 77
62# Link GNUnet's FCFS zone into master zone under label "pin" 78# Link GNUnet's FCFS zone into master zone under label "pin"
63gnunet-namestore -z master-zone -a -e never -n pin -p -t PKEY -V 72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG $options 79if (gnunet-namestore -z master-zone -D -n pin -t PKEY | grep "PKEY: $PIN" &>/dev/null)
64 80then
81 :
82else
83 gnunet-namestore -z master-zone -a -e never -n pin -p -t PKEY -V $PIN $options
84fi