Skip package installs if in mesh mode
This commit is contained in:
parent
48c9d23971
commit
4c40c05ba6
|
@ -104,9 +104,11 @@ function configure_ssh_client {
|
||||||
}
|
}
|
||||||
|
|
||||||
function mesh_babel {
|
function mesh_babel {
|
||||||
sudo apt-get -y install babeld
|
if [ ! -f /tmp/meshtype ]; then
|
||||||
sudo apt-get -y install irssi mumble
|
sudo apt-get -y install babeld
|
||||||
sudo apt-get -y install toxic
|
sudo apt-get -y install irssi mumble
|
||||||
|
sudo apt-get -y install toxic
|
||||||
|
fi
|
||||||
|
|
||||||
babel_script=/tmp/babel
|
babel_script=/tmp/babel
|
||||||
|
|
||||||
|
@ -188,11 +190,13 @@ function mesh_babel {
|
||||||
}
|
}
|
||||||
|
|
||||||
function mesh_batman {
|
function mesh_batman {
|
||||||
sudo apt-get -y install iproute bridge-utils libnetfilter-conntrack3 batctl
|
if [ ! -f /tmp/meshtype ]; then
|
||||||
sudo apt-get -y install python-dev libevent-dev ebtables python-pip
|
sudo apt-get -y install iproute bridge-utils libnetfilter-conntrack3 batctl
|
||||||
sudo apt-get -y install wireless-tools rfkill
|
sudo apt-get -y install python-dev libevent-dev ebtables python-pip
|
||||||
sudo apt-get -y install irssi mumble
|
sudo apt-get -y install wireless-tools rfkill
|
||||||
sudo apt-get -y install toxic
|
sudo apt-get -y install irssi mumble
|
||||||
|
sudo apt-get -y install toxic
|
||||||
|
fi
|
||||||
|
|
||||||
batman_script=/tmp/batman
|
batman_script=/tmp/batman
|
||||||
|
|
||||||
|
|
|
@ -146,13 +146,15 @@ if [ ! -f $MUMBLE_PATH ]; then
|
||||||
sudo cp $DHTNODES $DHTNODES.internet
|
sudo cp $DHTNODES $DHTNODES.internet
|
||||||
fi
|
fi
|
||||||
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}')
|
PEER_TOX_ID=$(lstox -p $AVAHI_DOMAIN | head -n 1 | awk -F ' ' '{print $2}')
|
||||||
if [ ${#PEER_TOX_ID} -gt 30 ]; then
|
if [ ${#PEER_TOX_ID} -gt 30 ]; then
|
||||||
echo "/add $PEER_TOX_ID
|
echo "/add $PEER_TOX_ID
|
||||||
" | $TOXIC_PATH -d
|
" | $TOXIC_PATH -d
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
echo $PEER_TOX_ID
|
||||||
echo "Tox ID for $AVAHI_DOMAIN was not found"
|
echo "Tox ID for $AVAHI_DOMAIN was not found"
|
||||||
exit 6
|
exit 6
|
||||||
fi
|
fi
|
||||||
|
@ -204,7 +206,8 @@ else
|
||||||
sudo cp $DHTNODES $DHTNODES.internet
|
sudo cp $DHTNODES $DHTNODES.internet
|
||||||
fi
|
fi
|
||||||
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}')
|
PEER_TOX_ID=$(lstox -p $AVAHI_DOMAIN | head -n 1 | awk -F ' ' '{print $2}')
|
||||||
if [ ${#PEER_TOX_ID} -gt 30 ]; then
|
if [ ${#PEER_TOX_ID} -gt 30 ]; then
|
||||||
echo "/add $PEER_TOX_ID
|
echo "/add $PEER_TOX_ID
|
||||||
|
|
Loading…
Reference in New Issue