From 7965217d61e03d84a51f8ae284c6a9fbe655134c Mon Sep 17 00:00:00 2001 From: d3v11 Date: Mon, 28 Nov 2011 19:49:16 +0000 Subject: updates to peer2anonet --- contrib/peer2anonet/peer2anonet | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'contrib/peer2anonet') diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 7525b01..7fdc78e 100755 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -401,15 +401,23 @@ CONFIGURE_DNS(){ GIT_IP=`cat conf/gitd_ip` GIT_DOMAIN="git.$NICK.ano" - ip addr add $TINYDNS_ROOT_IP/32 dev lo & - ip addr add $TINYDNS_IP/32 dev lo & - ip addr add $TINYDNS_ANO_IP/32 dev lo & - ip addr add $GIT_IP/32 dev lo & - - echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.local - echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.local - echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.local - echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.local + ip addr add $TINYDNS_ROOT_IP/32 dev lo > /dev/null 2>&1 + ip addr add $TINYDNS_IP/32 dev lo > /dev/null 2>&1 + ip addr add $TINYDNS_ANO_IP/32 dev lo > /dev/null 2>&1 + ip addr add $GIT_IP/32 dev lo > /dev/null 2>&1 + + if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ROOT_IP/32 dev lo &"* ]]; then + echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.local + fi + if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_IP/32 dev lo &"* ]]; then + echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.local + fi + if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ANO_IP/32 dev lo &"* ]]; then + echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.local + fi + if [[ $(cat /etc/rc.local) != *"ip addr add $GIT_IP/32 dev lo &"* ]]; then + echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.local + fi useradd Gdnscache useradd Gdnslog -- cgit v1.2.3