Show i2p address on user control panel

This commit is contained in:
Bob Mottram 2018-02-12 13:39:47 +00:00
parent 799a31ce8f
commit c1c7a6c78c
1 changed files with 33 additions and 17 deletions

View File

@ -882,6 +882,20 @@ function menu_run_client_app {
fi
}
function show_your_email_address {
GPG_FINGERPRINT=$(gpg --fingerprint $GPG_ID | sed -n '2p' | sed 's/^[ \t]*//')
GPG_DATE=$(gpg --fingerprint $GPG_ID | grep -i "pub" | head -n 1 | awk -F ' ' '{print $3}')
if [ ! -d /etc/bdsmail ]; then
dialog --title $"Show your Email Address" \
--backtitle $"Freedombone User Control Panel" \
--msgbox $"Email Address: $MY_EMAIL_ADDRESS\n\nKey ID: $GPG_ID\n\nFingerprint: $GPG_FINGERPRINT\n\nCreated: $GPG_DATE" 12 70
else
dialog --title $"Show your Email Address" \
--backtitle $"Freedombone User Control Panel" \
--msgbox $"\nYou can press SHIFT and then drag the mouse and right click to copy.\n\nEmail Address: $MY_EMAIL_ADDRESS\n\nKey ID: $GPG_ID\n\nFingerprint: $GPG_FINGERPRINT\n\nCreated: $GPG_DATE\n\nI2P Address: ${USER}@$(bdsmail_domain)" 17 90
fi
}
function menu_top_level {
while true
do
@ -889,16 +903,17 @@ function menu_top_level {
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone User Control Panel" \
--title $"User Control Panel" \
--radiolist $"Choose an operation:" 19 50 12 \
--radiolist $"Choose an operation:" 20 50 13 \
1 $"Use Email" off \
2 $"Change Email Filtering Rules" off \
3 $"Run an App" off \
4 $"Browse the Web" off \
5 $"My Encryption Keys" off \
6 $"Set an outgoing email proxy" off \
7 $"Administrator controls" off \
8 $"Exit to the command line" off \
9 $"Log out" on 2> $data
2 $"Show your Email Address" off \
3 $"Change Email Filtering/Blocking Rules" off \
4 $"Run an App" off \
5 $"Browse the Web" off \
6 $"My Encryption Keys" off \
7 $"Set an outgoing email proxy" off \
8 $"Administrator controls" off \
9 $"Exit to the command line" off \
10 $"Log out" on 2> $data
sel=$?
case $sel in
1) rm $data
@ -908,15 +923,16 @@ function menu_top_level {
esac
case $(cat $data) in
1) mutt;;
2) menu_email;;
3) menu_run_client_app;;
4) torify elinks -no-home;;
5) menu_encryption_keys;;
6) smtp_proxy;;
7) menu_admin;;
8) rm $data
2) show_your_email_address;;
3) menu_email;;
4) menu_run_client_app;;
5) torify elinks -no-home;;
6) menu_encryption_keys;;
7) smtp_proxy;;
8) menu_admin;;
9) rm $data
break;;
9) kill -HUP `pgrep -s 0 -o`;;
10) kill -HUP `pgrep -s 0 -o`;;
esac
rm $data
done