Show local trove details within About
This commit is contained in:
parent
3e90015ce1
commit
9d04bf3043
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue