|
|
|
@ -446,11 +446,7 @@ function mesh_tox_node_remove {
|
|
|
|
|
|
|
|
|
|
function mesh_tox_node {
|
|
|
|
|
# obtain commits from the main file
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOXCORE_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOXCORE_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOXCORE_COMMIT_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then
|
|
|
|
|
TOXCORE_COMMIT=$TOXCORE_COMMIT_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -459,11 +455,7 @@ function mesh_tox_node {
|
|
|
|
|
exit 76325
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOXID_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOXID_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOXID_REPO_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXID_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then
|
|
|
|
|
TOXID_REPO=$TOXID_REPO_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -472,11 +464,7 @@ function mesh_tox_node {
|
|
|
|
|
exit 78252
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOX_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOX_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOX_PORT_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
|
|
|
|
|
TOX_PORT=$TOX_PORT_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -485,11 +473,7 @@ function mesh_tox_node {
|
|
|
|
|
exit 32856
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOXCORE_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOXCORE_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOXCORE_REPO_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
if [ ${#TOXCORE_REPO_MAIN} -gt 10 ]; then
|
|
|
|
|
TOXCORE_REPO=$TOXCORE_REPO_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -595,27 +579,15 @@ function mesh_tox_client_remove {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function mesh_tox_client {
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOXIC_FILE=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
|
|
|
|
|
# obtain commits from the main file
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOXIC_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOXIC_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOXIC_COMMIT_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
if [ ${#TOXIC_COMMIT_MAIN} -gt 10 ]; then
|
|
|
|
|
TOXIC_COMMIT=$TOXIC_COMMIT_MAIN
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOXIC_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOXIC_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOXIC_REPO_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXIC_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
if [ ${#TOXIC_REPO_MAIN} -gt 5 ]; then
|
|
|
|
|
TOXIC_REPO=$TOXIC_REPO_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -684,11 +656,7 @@ function mesh_zeronet_remove {
|
|
|
|
|
|
|
|
|
|
function mesh_zeronet {
|
|
|
|
|
# obtain commits from the main file
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
ZERONET_COMMIT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
ZERONET_COMMIT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
ZERONET_COMMIT_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-zeronet | grep "ZERONET_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
|
|
|
if [ ${#ZERONET_COMMIT_MAIN} -gt 10 ]; then
|
|
|
|
|
ZERONET_COMMIT=$ZERONET_COMMIT_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -697,11 +665,7 @@ function mesh_zeronet {
|
|
|
|
|
exit 37046
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
ZERONET_REPO_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
ZERONET_REPO_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
ZERONET_REPO_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-zeronet | grep "ZERONET_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
|
|
|
|
if [ ${#ZERONET_REPO_MAIN} -gt 5 ]; then
|
|
|
|
|
ZERONET_REPO=$ZERONET_REPO_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -710,11 +674,7 @@ function mesh_zeronet {
|
|
|
|
|
exit 37046
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
ZERONET_PORT_MAIN=$(cat /usr/local/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
ZERONET_PORT_MAIN=$(cat /usr/bin/${PROJECT_NAME}-app-zeronet | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
ZERONET_PORT_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-zeronet | grep "ZERONET_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
if [ ${#ZERONET_PORT_MAIN} -gt 1 ]; then
|
|
|
|
|
ZERONET_PORT=$ZERONET_PORT_MAIN
|
|
|
|
|
fi
|
|
|
|
@ -796,11 +756,7 @@ function mesh_zeronet {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function install_batman_client {
|
|
|
|
|
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
|
|
|
|
|
TOXIC_FILE=$(cat /usr/local/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
else
|
|
|
|
|
TOXIC_FILE=$(cat /usr/bin/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
fi
|
|
|
|
|
TOXIC_FILE=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}')
|
|
|
|
|
|
|
|
|
|
if [ ! -f ${rootdir}/tmp/meshtype ]; then
|
|
|
|
|
$CHROOT_PREFIX sudo apt-get -y install iproute bridge-utils libnetfilter-conntrack3 batctl
|
|
|
|
|