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

Syncthing devices on user control panel

parent c83e73fc
No related branches found
No related tags found
No related merge requests found
......@@ -616,6 +616,20 @@ function menu_admin {
fi
}
function syncthing_devices {
SYNCTHING_CONFIG_FILE=~/.syncthingids
SYNCTHING_ID=$(cat ~/.syncthing-server-id)
if [ ! -f $SYNCTHING_CONFIG_FILE ]; then
echo $'# Your syncthing configuration file' > $SYNCTHING_CONFIG_FILE
echo '#' >> $SYNCTHING_CONFIG_FILE
echo $"# The ${PROJECT_NAME} syncthing ID is: $SYNCTHING_ID"
echo '#' >> $SYNCTHING_CONFIG_FILE
echo '# Paste the IDs of your devices below' >> $SYNCTHING_CONFIG_FILE
echo '#' >> $SYNCTHING_CONFIG_FILE
fi
editor $SYNCTHING_CONFIG_FILE
}
function menu_top_level {
while true
do
......@@ -623,18 +637,19 @@ 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:" 18 50 11 \
--radiolist $"Choose an operation:" 19 50 12 \
1 $"Use Email" off \
2 $"Change Email Filtering Rules" off \
3 $"Use Tox Chat" off \
4 $"Use XMPP Chat" off \
5 $"Use IRC" off \
6 $"Browse the Web" off \
7 $"Your Encryption Keys" off \
8 $"Set an outgoing email proxy" off \
9 $"Administrator controls" off \
10 $"Exit to the command line" off \
11 $"Log out" on 2> $data
7 $"Syncthing devices" off \
8 $"Your Encryption Keys" off \
9 $"Set an outgoing email proxy" off \
10 $"Administrator controls" off \
11 $"Exit to the command line" off \
12 $"Log out" on 2> $data
sel=$?
case $sel in
1) exit 1;;
......@@ -647,11 +662,12 @@ function menu_top_level {
4) torify profanity;;
5) torify irssi;;
6) torify elinks;;
7) menu_encryption_keys;;
8) smtp_proxy;;
9) menu_admin;;
10) break;;
11) kill -HUP `pgrep -s 0 -o`;;
7) syncthing_devices;;
8) menu_encryption_keys;;
9) smtp_proxy;;
10) menu_admin;;
11) break;;
12) kill -HUP `pgrep -s 0 -o`;;
esac
done
}
......
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