From 2b2ce8d78ac7b8cf8f1c54f70dcfbcf992946a0c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 27 May 2016 10:25:50 +0100 Subject: [PATCH] Typo --- src/freedombone | 16 ++++++++-------- src/freedombone-mesh | 13 +++++++++++++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/freedombone b/src/freedombone index 40e2a56b..79feabda 100755 --- a/src/freedombone +++ b/src/freedombone @@ -487,9 +487,9 @@ BABEL_PORT=6696 ENABLE_SOCIAL_KEY_MANAGEMENT="no" TOX_PORT=33445 -TOX_REPO="git://github.com/irungentoo/toxcore.git" +TOXCORE_REPO="git://github.com/irungentoo/toxcore.git" +TOXCORE_COMMIT='532629d486e3361c7d8d95b38293cc7d61dc4ee5' TOXID_REPO="https://github.com/bashrc/toxid" -TOX_COMMIT='532629d486e3361c7d8d95b38293cc7d61dc4ee5' TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt # These are some default nodes, but you can replace them with trusted nodes # as you prefer. See https://wiki.tox.im/Nodes @@ -1213,8 +1213,8 @@ function read_configuration { if grep -q "GOGS_COMMIT" $CONFIGURATION_FILE; then GOGS_COMMIT=$(grep "GOGS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi - if grep -q "TOX_COMMIT" $CONFIGURATION_FILE; then - TOX_COMMIT=$(grep "TOX_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + if grep -q "TOXCORE_COMMIT" $CONFIGURATION_FILE; then + TOXCORE_COMMIT=$(grep "TOXCORE_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi if grep -q "TOXIC_COMMIT" $CONFIGURATION_FILE; then TOXIC_COMMIT=$(grep "TOXIC_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') @@ -1297,8 +1297,8 @@ function read_configuration { if grep -q "TOX_NODES" $CONFIGURATION_FILE; then TOX_NODES=$(grep "TOX_NODES" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi - if grep -q "TOX_REPO" $CONFIGURATION_FILE; then - TOX_REPO=$(grep "TOX_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}') + if grep -q "TOXCORE_REPO" $CONFIGURATION_FILE; then + TOXCORE_REPO=$(grep "TOXCORE_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi if grep -q "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE; then ENABLE_SOCIAL_KEY_MANAGEMENT=$(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') @@ -3080,7 +3080,7 @@ function install_zeronet { return fi - ${PROJECT_NAME}=mesh-install zeronet + ${PROJECT_NAME}-mesh-install zeronet systemctl daemon-reload systemctl start tracker.service systemctl start zeronet.service @@ -6858,7 +6858,7 @@ function install_tox_node { fi # update to the next commit - set_repo_commit $INSTALL_DIR/toxcore "toxcore commit" "$TOX_COMMIT" $TOX_REPO + set_repo_commit $INSTALL_DIR/toxcore "toxcore commit" "$TOXCORE_COMMIT" $TOXCORE_REPO if grep -Fxq "install_tox_node" $COMPLETION_FILE; then return diff --git a/src/freedombone-mesh b/src/freedombone-mesh index db3d83af..eb11ec01 100755 --- a/src/freedombone-mesh +++ b/src/freedombone-mesh @@ -33,6 +33,8 @@ PROJECT_NAME='freedombone' export TEXTDOMAIN=${PROJECT_NAME}-mesh export TEXTDOMAINDIR="/usr/share/locale" +CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg + MUMBLE_PATH=/usr/bin/mumble 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}') @@ -45,6 +47,17 @@ PEERS_FILE=/tmp/meshpeers.txt TOX_PORT=33445 TOXCORE_REPO='git://github.com/irungentoo/toxcore.git' +TOXCORE_COMMIT= +# obtain tox values from main install +if grep -q "TOX_PORT=" $CONFIG_FILE; then + TOX_PORT=$(cat $CONFIG_FILE | grep "TOX_PORT=" | nead -n 1 | awk -F '=' '{print $2}') +fi +if grep -q "TOXCORE_REPO=" $CONFIG_FILE; then + TOXCORE_REPO=$(cat $CONFIG_FILE | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}') +fi +if grep -q "TOXCORE_COMMIT=" $CONFIG_FILE; then + TOXCORE_COMMIT=$(cat $CONFIG_FILE | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') +fi TOXID_REPO='https://github.com/bashrc/toxid' TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt QTOX_INI="/home/$USER/.config/tox/qtox.ini"