From 8575325d478c34c2fbbe0c3ae9f2d1d2c7fcfcf8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Jan 2015 19:58:02 +0000 Subject: [PATCH] Initialise cjdcmd --- install-freedombone.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install-freedombone.sh b/install-freedombone.sh index 16e64e77..ce0c07f4 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -717,10 +717,11 @@ function install_cjdns { echo ' echo "cjdroute is already running. Doing nothing..."' >> /etc/init.d/cjdns echo ' else' >> /etc/init.d/cjdns echo ' echo " * Starting cjdroute"' >> /etc/init.d/cjdns - echo ' /sbin/ip addr add $CJDNS_IP/8 dev cjdroute0' >> /etc/init.d/cjdns - echo ' /sbin/ip link set mtu 1312 dev cjdroute0' >> /etc/init.d/cjdns - echo ' /sbin/ip link set cjdroute0 up' >> /etc/init.d/cjdns echo ' su -c "$PROG_PATH/$PROG < $PROG_PATH/$CJDNS_CONFIG" - $CJDNS_USER' >> /etc/init.d/cjdns + echo ' /sbin/ip addr add $CJDNS_IP/8 dev tun0' >> /etc/init.d/cjdns + echo ' /sbin/ip link set mtu 1312 dev tun0' >> /etc/init.d/cjdns + echo ' /sbin/ip link set tun0 up' >> /etc/init.d/cjdns + echo ' /sbin/ip tuntap add mode tun user cjdns dev tun0' >> /etc/init.d/cjdns echo ' fi' >> /etc/init.d/cjdns echo '}' >> /etc/init.d/cjdns echo '' >> /etc/init.d/cjdns @@ -882,6 +883,9 @@ function install_cjdns_tools { fi cp $HOME/projects/go/bin/cjdcmd /usr/bin + # initialise from the cjdns config + /usr/bin/cjdcmd cjdnsadmin -file /etc/cjdns/cjdroute.conf + echo 'install_cjdns_tools' >> $COMPLETION_FILE }