Port has no quotes

This commit is contained in:
Bob Mottram 2016-04-12 10:06:58 +01:00
parent 2cb0102ed6
commit 3faa143b69
1 changed files with 19 additions and 7 deletions

View File

@ -38,8 +38,6 @@ export TEXTDOMAINDIR="/usr/share/locale"
# for mesh installs
TRACKER_PORT=6969
ZERONET_PORT=15441
WIFI_CHANNEL=2
WIFI_INTERFACE='wlan0'
@ -71,6 +69,7 @@ TOX_NODES=
# To avoid confusions these are obtained from the main project file
ZERONET_REPO=
ZERONET_COMMIT=
ZERONET_PORT=
function show_help {
echo ''
@ -449,9 +448,9 @@ function mesh_tox_node {
fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOX_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
TOX_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
else
TOX_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
TOX_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
fi
if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
TOX_PORT=$TOX_PORT_MAIN
@ -615,6 +614,19 @@ function mesh_zeronet {
echo $'No Tox commit was specified'
exit 37046
fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
else
ZERONET_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
fi
if [ ${#ZERONET_PORT_MAIN} -gt 1 ]; then
ZERONET_PORT=$ZERONET_PORT_MAIN
fi
if [ ! $ZERONET_PORT ]; then
echo $'No zeronet port was specified'
exit 67433
fi
$CHROOT_PREFIX apt-get -y install python python-msgpack python-gevent
$CHROOT_PREFIX apt-get -y install python-pip bittornado
@ -696,9 +708,9 @@ function mesh_batman_client {
if [ ! -f /usr/bin/toxic ]; then
$CHROOT_PREFIX sudo apt-get -y install toxic
echo "n
/nick $USER
/exit
" | ${rootdir}/usr/bin/toxic -d
/nick $USER
/exit
" | ${rootdir}/usr/bin/toxic -d
fi
fi