Skip package installs if in mesh mode

This commit is contained in:
Bob Mottram 2015-08-26 20:55:41 +01:00
parent 48c9d23971
commit 4c40c05ba6
2 changed files with 17 additions and 10 deletions

View File

@ -104,9 +104,11 @@ function configure_ssh_client {
}
function mesh_babel {
sudo apt-get -y install babeld
sudo apt-get -y install irssi mumble
sudo apt-get -y install toxic
if [ ! -f /tmp/meshtype ]; then
sudo apt-get -y install babeld
sudo apt-get -y install irssi mumble
sudo apt-get -y install toxic
fi
babel_script=/tmp/babel
@ -188,11 +190,13 @@ function mesh_babel {
}
function mesh_batman {
sudo apt-get -y install iproute bridge-utils libnetfilter-conntrack3 batctl
sudo apt-get -y install python-dev libevent-dev ebtables python-pip
sudo apt-get -y install wireless-tools rfkill
sudo apt-get -y install irssi mumble
sudo apt-get -y install toxic
if [ ! -f /tmp/meshtype ]; then
sudo apt-get -y install iproute bridge-utils libnetfilter-conntrack3 batctl
sudo apt-get -y install python-dev libevent-dev ebtables python-pip
sudo apt-get -y install wireless-tools rfkill
sudo apt-get -y install irssi mumble
sudo apt-get -y install toxic
fi
batman_script=/tmp/batman

View File

@ -146,13 +146,15 @@ if [ ! -f $MUMBLE_PATH ]; then
sudo cp $DHTNODES $DHTNODES.internet
fi
fi
sudo lstox -f dht > $DHTNODES
lstox -f dht > /tmp/dht
sudo cp /tmp/dht $DHTNODES
PEER_TOX_ID=$(lstox -p $AVAHI_DOMAIN | head -n 1 | awk -F ' ' '{print $2}')
if [ ${#PEER_TOX_ID} -gt 30 ]; then
echo "/add $PEER_TOX_ID
" | $TOXIC_PATH -d
exit 0
else
echo $PEER_TOX_ID
echo "Tox ID for $AVAHI_DOMAIN was not found"
exit 6
fi
@ -204,7 +206,8 @@ else
sudo cp $DHTNODES $DHTNODES.internet
fi
fi
sudo lstox -f dht > $DHTNODES
lstox -f dht > /tmp/dht
sudo cp /tmp/dht $DHTNODES
PEER_TOX_ID=$(lstox -p $AVAHI_DOMAIN | head -n 1 | awk -F ' ' '{print $2}')
if [ ${#PEER_TOX_ID} -gt 30 ]; then
echo "/add $PEER_TOX_ID