Skip to content
Snippets Groups Projects
Commit 9d04bf30 authored by Bob Mottram's avatar Bob Mottram
Browse files

Show local trove details within About

parent 3e90015c
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,8 @@ MINIMUM_PASSWORD_LENGTH=8
VOIP_PORT=64738
VOIP_ONION_PORT=8095
SSH_PORT=2222
USB_DRIVE=sdb
# get default USB from config file
CONFIGURATION_FILE=/root/${PROJECT_NAME}.cfg
......@@ -57,6 +59,9 @@ if [ -f $CONFIGURATION_FILE ]; then
USB_DRIVE=$(echo ${USB_DRIVE} | awk -F '/' '{print $3}' | sed 's|1||g' | sed 's|2||g')
fi
fi
if grep -q "SSH_PORT=" $CONFIGURATION_FILE; then
SSH_PORT=$(cat $CONFIGURATION_FILE | grep "SSH_PORT=" | awk -F '=' '{print $2}')
fi
fi
# Trove settings
......@@ -370,10 +375,27 @@ function show_users {
done
}
function show_trove_password {
if [ ! /home/trove ]; then
return
fi
if grep -q "MY_TROVE_PASSWORD" $CONFIGURATION_FILE; then
MY_TROVE_PASSWORD=$(grep "MY_TROVE_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
echo 'Local Trove'
echo '==========='
echo ''
echo -n "URL: "
echo "$(cat ${COMPLETION_FILE} | grep 'ssh onion domain' | awk -F ':' '{print $2}')"
echo "SSH Port: $SSH_PORT"
echo "Password: $MY_TROVE_PASSWORD"
}
function show_about {
clear
show_domains
show_users
show_trove_password
any_key
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment