More script replacements

This commit is contained in:
Bob Mottram 2016-07-03 17:45:55 +01:00
parent cc61a80f97
commit 998274090f
2 changed files with 48 additions and 48 deletions

View File

@ -859,9 +859,9 @@ function mesh_tox_client {
cp $TEMP_SCRIPT $rootdir/root/ cp $TEMP_SCRIPT $rootdir/root/
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
else else
TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
fi fi
SECONDS=0 SECONDS=0
@ -885,9 +885,9 @@ function mesh_tox_client {
function mesh_zeronet { function mesh_zeronet {
# obtain commits from the main file # obtain commits from the main file
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
ZERONET_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#ZERONET_COMMIT_MAIN} -gt 10 ]; then if [ ${#ZERONET_COMMIT_MAIN} -gt 10 ]; then
ZERONET_COMMIT=$ZERONET_COMMIT_MAIN ZERONET_COMMIT=$ZERONET_COMMIT_MAIN
@ -898,9 +898,9 @@ function mesh_zeronet {
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}')
else else
ZERONET_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}')
fi fi
if [ ${#ZERONET_REPO_MAIN} -gt 5 ]; then if [ ${#ZERONET_REPO_MAIN} -gt 5 ]; then
ZERONET_REPO=$ZERONET_REPO_MAIN ZERONET_REPO=$ZERONET_REPO_MAIN
@ -911,9 +911,9 @@ function mesh_zeronet {
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then 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}') ZERONET_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
else else
ZERONET_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}') ZERONET_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
fi fi
if [ ${#ZERONET_PORT_MAIN} -gt 1 ]; then if [ ${#ZERONET_PORT_MAIN} -gt 1 ]; then
ZERONET_PORT=$ZERONET_PORT_MAIN ZERONET_PORT=$ZERONET_PORT_MAIN
@ -996,11 +996,11 @@ function mesh_zeronet {
function mesh_zeronet_blog { function mesh_zeronet_blog {
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_BLOG_REPO=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_BLOG_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_BLOG_REPO=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_BLOG_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_BLOG_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_BLOG_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_BLOG_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_BLOG_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
ZERONET_BLOG_REPO=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_BLOG_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_BLOG_REPO=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_BLOG_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_BLOG_COMMIT=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_BLOG_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_BLOG_COMMIT=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_BLOG_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
git clone $ZERONET_BLOG_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroBlog git clone $ZERONET_BLOG_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroBlog
@ -1015,11 +1015,11 @@ function mesh_zeronet_blog {
function mesh_zeronet_mail { function mesh_zeronet_mail {
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_MAIL_REPO=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_MAIL_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_MAIL_REPO=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_MAIL_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_MAIL_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_MAIL_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_MAIL_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_MAIL_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
ZERONET_MAIL_REPO=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_MAIL_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_MAIL_REPO=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_MAIL_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_MAIL_COMMIT=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_MAIL_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_MAIL_COMMIT=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_MAIL_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
git clone $ZERONET_MAIL_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroMail git clone $ZERONET_MAIL_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroMail
@ -1034,11 +1034,11 @@ function mesh_zeronet_mail {
function mesh_zeronet_forum { function mesh_zeronet_forum {
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_FORUM_REPO=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_FORUM_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_FORUM_REPO=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_FORUM_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_FORUM_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_FORUM_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_FORUM_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_FORUM_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
ZERONET_FORUM_REPO=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_FORUM_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_FORUM_REPO=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_FORUM_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_FORUM_COMMIT=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_FORUM_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_FORUM_COMMIT=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_FORUM_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
git clone $ZERONET_FORUM_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroTalk git clone $ZERONET_FORUM_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroTalk
@ -1053,11 +1053,11 @@ function mesh_zeronet_forum {
function mesh_zeronet_id { function mesh_zeronet_id {
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_ID_REPO=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_ID_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_ID_REPO=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_ID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_ID_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_ID_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_ID_COMMIT=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_ID_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
ZERONET_ID_REPO=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_ID_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_ID_REPO=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_ID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
ZERONET_ID_COMMIT=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_ID_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_ID_COMMIT=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_ID_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
git clone $ZERONET_ID_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroID git clone $ZERONET_ID_REPO $rootdir$MESH_INSTALL_DIR/zeronet/ZeroID

View File

@ -221,9 +221,9 @@ function mesh_avahi {
function mesh_babel_client { function mesh_babel_client {
# TODO to be fixed # TODO to be fixed
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
else else
TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
fi fi
if [ ! -f ${rootdir}/tmp/meshtype ]; then if [ ! -f ${rootdir}/tmp/meshtype ]; then
@ -421,9 +421,9 @@ function mesh_firewall {
function mesh_tox_node { function mesh_tox_node {
# obtain commits from the main file # obtain commits from the main file
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXCORE_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') TOXCORE_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
TOXCORE_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') TOXCORE_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then
TOXCORE_COMMIT=$TOXCORE_COMMIT_MAIN TOXCORE_COMMIT=$TOXCORE_COMMIT_MAIN
@ -434,9 +434,9 @@ function mesh_tox_node {
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXID_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}') TOXID_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
else else
TOXID_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}') TOXID_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
fi fi
if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then
TOXID_REPO=$TOXID_REPO_MAIN TOXID_REPO=$TOXID_REPO_MAIN
@ -447,9 +447,9 @@ function mesh_tox_node {
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then 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}-app-tox | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
else 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}-app-tox | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
fi fi
if [ ${#TOX_PORT_MAIN} -gt 2 ]; then if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
TOX_PORT=$TOX_PORT_MAIN TOX_PORT=$TOX_PORT_MAIN
@ -460,9 +460,9 @@ function mesh_tox_node {
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXCORE_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}') TOXCORE_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}')
else else
TOXCORE_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}') TOXCORE_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}')
fi fi
if [ ${#TOXCORE_REPO_MAIN} -gt 10 ]; then if [ ${#TOXCORE_REPO_MAIN} -gt 10 ]; then
TOXCORE_REPO=$TOXCORE_REPO_MAIN TOXCORE_REPO=$TOXCORE_REPO_MAIN
@ -561,25 +561,25 @@ function mesh_tox_node {
function mesh_tox_client { function mesh_tox_client {
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
else else
TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
fi fi
# obtain commits from the main file # obtain commits from the main file
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXIC_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') TOXIC_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
TOXIC_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') TOXIC_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#TOXIC_COMMIT_MAIN} -gt 10 ]; then if [ ${#TOXIC_COMMIT_MAIN} -gt 10 ]; then
TOXIC_COMMIT=$TOXIC_COMMIT_MAIN TOXIC_COMMIT=$TOXIC_COMMIT_MAIN
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXIC_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_REPO=" | head -n 1 | awk -F '"' '{print $2}') TOXIC_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_REPO=" | head -n 1 | awk -F '"' '{print $2}')
else else
TOXIC_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_REPO=" | head -n 1 | awk -F '"' '{print $2}') TOXIC_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_REPO=" | head -n 1 | awk -F '"' '{print $2}')
fi fi
if [ ${#TOXIC_REPO_MAIN} -gt 5 ]; then if [ ${#TOXIC_REPO_MAIN} -gt 5 ]; then
TOXIC_REPO=$TOXIC_REPO_MAIN TOXIC_REPO=$TOXIC_REPO_MAIN
@ -632,9 +632,9 @@ function mesh_tox_client_toxic_from_repo {
function mesh_zeronet { function mesh_zeronet {
# obtain commits from the main file # obtain commits from the main file
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
else else
ZERONET_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') ZERONET_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
fi fi
if [ ${#ZERONET_COMMIT_MAIN} -gt 10 ]; then if [ ${#ZERONET_COMMIT_MAIN} -gt 10 ]; then
ZERONET_COMMIT=$ZERONET_COMMIT_MAIN ZERONET_COMMIT=$ZERONET_COMMIT_MAIN
@ -645,9 +645,9 @@ function mesh_zeronet {
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
ZERONET_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME} | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}')
else else
ZERONET_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}') ZERONET_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}')
fi fi
if [ ${#ZERONET_REPO_MAIN} -gt 5 ]; then if [ ${#ZERONET_REPO_MAIN} -gt 5 ]; then
ZERONET_REPO=$ZERONET_REPO_MAIN ZERONET_REPO=$ZERONET_REPO_MAIN
@ -658,9 +658,9 @@ function mesh_zeronet {
fi fi
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then 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}') ZERONET_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
else else
ZERONET_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME} | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}') ZERONET_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
fi fi
if [ ${#ZERONET_PORT_MAIN} -gt 1 ]; then if [ ${#ZERONET_PORT_MAIN} -gt 1 ]; then
ZERONET_PORT=$ZERONET_PORT_MAIN ZERONET_PORT=$ZERONET_PORT_MAIN
@ -744,9 +744,9 @@ function mesh_zeronet {
function mesh_batman_client { function mesh_batman_client {
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
else else
TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME} | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
fi fi
if [ ! -f ${rootdir}/tmp/meshtype ]; then if [ ! -f ${rootdir}/tmp/meshtype ]; then