Beginning translation strings

This commit is contained in:
Bob Mottram 2015-11-27 12:31:28 +00:00
parent 6fc3017853
commit 2558225fb5
2 changed files with 451 additions and 446 deletions

View File

@ -104,16 +104,16 @@ DH_KEYLENGTH=
function show_help {
echo ''
echo 'freedombone-config -f [config filename] -m [min password length]'
echo $'freedombone-config -f [config filename] -m [min password length]'
echo ''
echo 'Creates an inventory of remote backup locations'
echo $'Creates an inventory of remote backup locations'
echo ''
echo ''
echo ' -h --help Show help'
echo ' -f --filename Configuration file (usually freedombone.cfg)'
echo ' -m --min Minimum password length (characters)'
echo ' -w --www Freedombone web site'
echo ' -b --bm Freedombone support Bitmessage address'
echo $' -h --help Show help'
echo $' -f --filename Configuration file (usually freedombone.cfg)'
echo $' -m --min Minimum password length (characters)'
echo $' -w --www Freedombone web site'
echo $' -b --bm Freedombone support Bitmessage address'
echo ''
exit 0
}
@ -276,15 +276,15 @@ function interactive_gpg_from_remote {
freedombone-remote -u $MY_USERNAME -l $REMOTE_SERVERS_LIST -t "Remote server"
if [ ! -f $REMOTE_SERVERS_LIST ]; then
dialog --title "Encryption keys" --msgbox 'Error obtaining server list' 6 70
dialog --title $"Encryption keys" --msgbox $'Error obtaining server list' 6 70
return 1
fi
# check the number of entries in the file
no_of_servers=$(cat $REMOTE_SERVERS_LIST | wc -l)
if (( no_of_servers < 3 )); then
dialog --title "Encryption keys" \
--msgbox 'There must be at least three servers to recover the key' 6 70
dialog --title $"Encryption keys" \
--msgbox $'There must be at least three servers to recover the key' 6 70
return 2
fi
@ -292,11 +292,11 @@ function interactive_gpg_from_remote {
apt-get -y install libgfshare-bin gnupg
freedombone-recoverkey -u $MY_USERNAME -l $REMOTE_SERVERS_LIST
if [ ! "$?" = "0" ]; then
dialog --title "Encryption keys" --msgbox 'Your key could not be recovered' 6 70
dialog --title $"Encryption keys" --msgbox $'Your key could not be recovered' 6 70
return 3
fi
dialog --title "Encryption keys" --msgbox 'Your key has been recovered' 6 70
dialog --title $"Encryption keys" --msgbox $'Your key has been recovered' 6 70
return 0
}
@ -308,36 +308,36 @@ function reconstruct_key {
cd /home/$MY_USERNAME/.gnupg_fragments
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
if (( no_of_shares < 4 )); then
dialog --title "Encryption keys" --msgbox 'Not enough fragments to reconstruct the key' 6 70
dialog --title $"Encryption keys" --msgbox $'Not enough fragments to reconstruct the key' 6 70
exit 7348
fi
apt-get -y install libgfshare-bin gnupg
gfcombine /home/$MY_USERNAME/.gnupg_fragments/keyshare*
if [ ! "$?" = "0" ]; then
dialog --title "Encryption keys" --msgbox 'Unable to reconstruct the key' 6 70
dialog --title $"Encryption keys" --msgbox $'Unable to reconstruct the key' 6 70
exit 7348
fi
KEYS_FILE=/home/$MY_USERNAME/.gnupg_fragments/keyshare.asc
if [ ! -f $KEYS_FILE ]; then
dialog --title "Encryption keys" --msgbox 'Unable to reconstruct the key' 6 70
dialog --title $"Encryption keys" --msgbox $'Unable to reconstruct the key' 6 70
fi
su -c "gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
if [ ! "$?" = "0" ]; then
echo 'Unable to import gpg key'
echo $'Unable to import gpg key'
shred -zu $KEYS_FILE
rm -rf /home/$MY_USERNAME/.tempgnupg
exit 9654
fi
shred -zu $KEYS_FILE
dialog --title "Encryption keys" --msgbox 'Key has been reconstructed' 6 70
dialog --title $"Encryption keys" --msgbox $'Key has been reconstructed' 6 70
}
function interactive_gpg_from_usb {
dialog --title "Encryption keys" \
--msgbox 'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
dialog --title $"Encryption keys" \
--msgbox $'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
HOME_DIR=/home/$MY_USERNAME
GPG_LOADING="yes"
@ -352,7 +352,7 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title "Encryption keys" --msgbox 'No USB drive found' 6 30
dialog --title $"Encryption keys" --msgbox $'No USB drive found' 6 30
exit 739836
fi
else
@ -366,7 +366,7 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title "Encryption keys" --msgbox 'No USB drive found' 6 30
dialog --title $"Encryption keys" --msgbox $'No USB drive found' 6 30
exit 27852
fi
fi
@ -394,8 +394,8 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title "Encryption keys" \
--msgbox "There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
dialog --title $"Encryption keys" \
--msgbox $"There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
rm -rf $GPG_USB_MOUNT
exit 74393
fi
@ -408,8 +408,8 @@ function interactive_gpg_from_usb {
reconstruct_key
return 0
fi
dialog --title "Encryption keys" \
--msgbox "The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
dialog --title $"Encryption keys" \
--msgbox $"The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
umount -f $GPG_USB_MOUNT
rm -rf $GPG_USB_MOUNT
exit 723814
@ -422,8 +422,8 @@ function interactive_gpg_from_usb {
fi
cp -r $GPG_USB_MOUNT/.gnupg/* $HOME_DIR/.gnupg
GPG_LOADING="no"
dialog --title "Encryption keys" \
--msgbox "GPG Keyring loaded to $HOME_DIR" 6 70
dialog --title $"Encryption keys" \
--msgbox $"GPG Keyring loaded to $HOME_DIR" 6 70
else
if [ ! -d $HOME_DIR/.gnupg_fragments ]; then
mkdir $HOME_DIR/.gnupg_fragments
@ -437,8 +437,8 @@ function interactive_gpg_from_usb {
mkdir $HOME_DIR/.ssh
fi
cp $GPG_USB_MOUNT/.ssh/* $HOME_DIR/.ssh
dialog --title "Encryption keys" \
--msgbox "ssh keys imported" 6 70
dialog --title $"Encryption keys" \
--msgbox $"ssh keys imported" 6 70
SSH_IMPORTED="yes"
fi
fi
@ -446,8 +446,8 @@ function interactive_gpg_from_usb {
umount -f $GPG_USB_MOUNT
rm -rf $GPG_USB_MOUNT
if [[ $GPG_LOADING == "yes" ]]; then
dialog --title "Encryption keys" \
--msgbox "Now remove the USB drive. Insert the next drive containing a key fragment, or select Ok to finish" 6 70
dialog --title $"Encryption keys" \
--msgbox $"Now remove the USB drive. Insert the next drive containing a key fragment, or select Ok to finish" 6 70
fi
GPG_CTR=$((GPG_CTR + 1))
done
@ -460,11 +460,11 @@ function interactive_gpg {
GPG_CONFIGURED="yes"
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--radiolist "GPG/PGP keys for your system:" 13 70 3 \
1 "Generate new keys (new user)" on \
2 "Import keys from USB drive/s" off \
3 "Retrieve keys from friends servers" off 2> $data
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"GPG/PGP keys for your system:" 13 70 3 \
1 $"Generate new keys (new user)" on \
2 $"Import keys from USB drive/s" off \
3 $"Retrieve keys from friends servers" off 2> $data
sel=$?
case $sel in
1) exit 1;;
@ -489,25 +489,25 @@ function interactive_configuration {
cp $CONFIGURATION_FILE temp.cfg
fi
FREEDNS_MESSAGE="Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
FREEDNS_MESSAGE=$"Please enter the FreeDNS code for this domain.\n\nThe code can be found by going to https://freedns.afraid.org, selecting 'Dynamic DNS' and then opening 'Wget example'. The code will consist of letters and numbers and be between the ? and = characters."
dialog --title "Freedombone" --msgbox "Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE" 15 50
dialog --title $"Freedombone" --msgbox $"Welcome to the Freedombone interactive installer. Communications freedom is only a short time away.\n\nEnsure that you have your domain and dynamic DNS settings ready.\n\nFor more information please visit $FREEDOMBONE_WEBSITE or send a Bitmessage to $FREEDOMBONE_BITMESSAGE" 15 50
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--radiolist "Type of Installation:" 18 40 11 \
1 Full on \
2 Writer off \
3 Cloud off \
4 Chat off \
5 Mailbox off \
6 Non-Mailbox off \
7 Social off \
8 Media off \
9 Developer off \
10 "Mesh (router)" off \
11 "Mesh (user device)" off 2> $data
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Type of Installation:" 18 40 11 \
1 $"Full" on \
2 $"Writer" off \
3 $"Cloud" off \
4 $"Chat" off \
5 $"Mailbox" off \
6 $"Non-Mailbox" off \
7 $"Social" off \
8 $"Media" off \
9 $"Developer" off \
10 $"Mesh (router)" off \
11 $"Mesh (user device)" off 2> $data
sel=$?
case $sel in
1) exit 1;;
@ -554,8 +554,8 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--inputbox "Wireless Mesh ESSID\n\nIf you press enter the default will be '$ESSID'" 10 40 "$(grep 'ESSID' temp.cfg | awk -F '=' '{print $2}')" 2> $data
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Wireless Mesh ESSID\n\nIf you press enter the default will be '$ESSID'" 10 40 "$(grep 'ESSID' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) ESSID=$(cat $data);;
@ -567,8 +567,8 @@ function interactive_configuration {
if [[ $SYSTEM_TYPE != "$VARIANT_MESH_USER" ]]; then
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--inputbox "Give your mesh peer a name" 10 40 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Give your mesh peer a name" 10 40 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) DEFAULT_DOMAIN_NAME=$(cat $data);;
@ -582,8 +582,8 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--radiolist "Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
1 "1" on \
2 "5" off \
3 "9" off \
@ -626,23 +626,23 @@ function interactive_configuration {
echo "| | (.-' (.-' ( | ( )| | | | )( )| | (.-' "
echo "' ' --' --' -' - -' ' ' -' -' -' ' - --'"
echo ''
echo 'Your system is now ready for connection to the mesh network'
echo $'Your system is now ready for connection to the mesh network'
echo ''
echo 'To connect to the network open a terminal and type:'
echo $'To connect to the network open a terminal and type:'
echo ''
echo ' meshweb'
echo ''
echo 'To disconnect from the mesh and return to the internet type:'
echo $'To disconnect from the mesh and return to the internet type:'
echo ''
echo ' sudo batman stop'
echo ''
echo 'To turn your system into a dedicated mesh peer you could add'
echo 'the meshweb command to your startup applications'
echo $'To turn your system into a dedicated mesh peer you could add'
echo $'the meshweb command to your startup applications'
echo ''
touch /tmp/meshuserdevice
exit 0
else
echo 'Failed to fully install the mesh networking system'
echo $'Failed to fully install the mesh networking system'
exit 74589
fi
fi
@ -652,8 +652,8 @@ function interactive_configuration {
else
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title "Select the user account to install as" \
--backtitle "Freedombone Configuration" \
dialog --title $"Select the user account to install as" \
--backtitle $"Freedombone Configuration" \
--dselect "/home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 14 40 2> $data
sel=$?
case $sel in
@ -664,32 +664,32 @@ function interactive_configuration {
fi
if [ ! $MY_USERNAME ]; then
echo 'No user account was selected'
echo $'No user account was selected'
exit 64398
fi
if [[ $MY_USERNAME == '-f' ]]; then
echo 'No user account was selected'
echo $'No user account was selected'
exit 8347
fi
if [[ $MY_USERNAME == 'debian' ]]; then
echo "Don't use the default debian user account"
echo $"Don't use the default debian user account"
exit 9341
fi
if [ ! -d /home/$MY_USERNAME ]; then
echo "The directory /home/$MY_USERNAME does not exist"
echo $"The directory /home/$MY_USERNAME does not exist"
exit 6437
fi
save_configuration_file
if [[ $(grep "INSTALLING_ON_BBB" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
dialog --title "Install Target" \
--backtitle "Freedombone Configuration" \
--yesno "\nAre you installing onto a Beaglebone Black?" 7 60
dialog --title $"Install Target" \
--backtitle $"Freedombone Configuration" \
--yesno $"\nAre you installing onto a Beaglebone Black?" 7 60
else
dialog --title "Install Target" \
--backtitle "Freedombone Configuration" \
dialog --title $"Install Target" \
--backtitle $"Freedombone Configuration" \
--defaultno \
--yesno "\nAre you installing onto a Beaglebone Black?" 7 60
--yesno $"\nAre you installing onto a Beaglebone Black?" 7 60
fi
sel=$?
case $sel in
@ -712,14 +712,14 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
SOCIAL_KEY_STR="\nDo you wish to enable social key management, otherwise known as \"the unforgettable key\"?\n\nThis means that fragments of your GPG key will be included with any remote backups so that if you later lose your key then it can be reconstructed from your friends servers. If you select \"no\" then you can still do social key management, but offline using physical USB thumb drives, which is more secure but less convenient."
SOCIAL_KEY_STR=$"\nDo you wish to enable social key management, otherwise known as \"the unforgettable key\"?\n\nThis means that fragments of your GPG key will be included with any remote backups so that if you later lose your key then it can be reconstructed from your friends servers. If you select \"no\" then you can still do social key management, but offline using physical USB thumb drives, which is more secure but less convenient."
if [[ $(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
dialog --title "Social Key Management" \
--backtitle "Freedombone Configuration" \
dialog --title $"Social Key Management" \
--backtitle $"Freedombone Configuration" \
--yesno "$SOCIAL_KEY_STR" 15 60
else
dialog --title "Social Key Management" \
--backtitle "Freedombone Configuration" \
dialog --title $"Social Key Management" \
--backtitle $"Freedombone Configuration" \
--defaultno \
--yesno "$SOCIAL_KEY_STR" 15 60
fi
@ -734,8 +734,8 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
if [[ $INSTALLING_ON_BBB != "yes" ]]; then
dialog --backtitle "Freedombone Configuration" \
--radiolist "Type of Random Number Generator:" 10 40 2 \
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Type of Random Number Generator:" 10 40 2 \
1 Haveged on \
2 OneRNG off 2> $data
sel=$?
@ -745,8 +745,8 @@ function interactive_configuration {
esac
case $(cat $data) in
2) HWRNG_TYPE="onerng"
dialog --title "OneRNG Device" \
--msgbox "Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
dialog --title $"OneRNG Device" \
--msgbox $"Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
;;
255) exit 1;;
esac
@ -757,57 +757,57 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--radiolist "Where to download Debian packages from:" 25 45 49 \
1 "Australia" off \
2 "Austria" off \
3 "Belarus" off \
4 "Belgium" off \
5 "Bosnia and Herzegovina" off \
6 "Brazil" off \
7 "Bulgaria" off \
8 "Canada" off \
9 "Chile" off \
10 "China" off \
11 "Croatia" off \
12 "Czech Republic" off \
13 "Denmark" off \
14 "El Salvador" off \
15 "Estonia" off \
16 "Finland" off \
17 "France 1" off \
18 "France 2" off \
19 "Germany 1" off \
20 "Germany 2" off \
21 "Greece" off \
22 "Hungary" off \
23 "Iceland" off \
24 "Iran" off \
25 "Ireland" off \
26 "Italy" off \
27 "Japan" off \
28 "Korea" off \
29 "Lithuania" off \
30 "Mexico" off \
31 "Netherlands" off \
32 "New Caledonia" off \
33 "New Zealand" off \
34 "Norway" off \
35 "Poland" off \
36 "Portugal" off \
37 "Romania" off \
38 "Russia" off \
39 "Slovakia" off \
40 "Slovenia" off \
41 "Spain" off \
42 "Sweden" off \
43 "Switzerland" off \
44 "Taiwan" off \
45 "Thailand" off \
46 "Turkey" off \
47 "Ukraine" off \
48 "United Kingdom" off \
49 "United States" on 2> $data
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Where to download Debian packages from:" 25 45 49 \
1 $"Australia" off \
2 $"Austria" off \
3 $"Belarus" off \
4 $"Belgium" off \
5 $"Bosnia and Herzegovina" off \
6 $"Brazil" off \
7 $"Bulgaria" off \
8 $"Canada" off \
9 $"Chile" off \
10 $"China" off \
11 $"Croatia" off \
12 $"Czech Republic" off \
13 $"Denmark" off \
14 $"El Salvador" off \
15 $"Estonia" off \
16 $"Finland" off \
17 $"France 1" off \
18 $"France 2" off \
19 $"Germany 1" off \
20 $"Germany 2" off \
21 $"Greece" off \
22 $"Hungary" off \
23 $"Iceland" off \
24 $"Iran" off \
25 $"Ireland" off \
26 $"Italy" off \
27 $"Japan" off \
28 $"Korea" off \
29 $"Lithuania" off \
30 $"Mexico" off \
31 $"Netherlands" off \
32 $"New Caledonia" off \
33 $"New Zealand" off \
34 $"Norway" off \
35 $"Poland" off \
36 $"Portugal" off \
37 $"Romania" off \
38 $"Russia" off \
39 $"Slovakia" off \
40 $"Slovenia" off \
41 $"Spain" off \
42 $"Sweden" off \
43 $"Switzerland" off \
44 $"Taiwan" off \
45 $"Thailand" off \
46 $"Turkey" off \
47 $"Ukraine" off \
48 $"United Kingdom" off \
49 $"United States" on 2> $data
sel=$?
case $sel in
1) exit 1;;
@ -869,24 +869,24 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--radiolist "Pick a domain name service (DNS):" 25 50 16 \
1 "Digital Courage" on \
2 "German Privacy Foundation 1" off \
3 "German Privacy Foundation 2" off \
4 "Chaos Computer Club" off \
5 "ClaraNet" off \
6 "OpenNIC 1" off \
7 "OpenNIC 2" off \
8 "OpenNIC 3" off \
9 "OpenNIC 4" off \
10 "OpenNIC 5" off \
11 "OpenNIC 6" off \
12 "OpenNIC 7" off \
13 "PowerNS" off \
14 "ValiDOM" off \
15 "Freie Unzensierte" off \
16 "Google" off 2> $data
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Pick a domain name service (DNS):" 25 50 16 \
1 $"Digital Courage" on \
2 $"German Privacy Foundation 1" off \
3 $"German Privacy Foundation 2" off \
4 $"Chaos Computer Club" off \
5 $"ClaraNet" off \
6 $"OpenNIC 1" off \
7 $"OpenNIC 2" off \
8 $"OpenNIC 3" off \
9 $"OpenNIC 4" off \
10 $"OpenNIC 5" off \
11 $"OpenNIC 6" off \
12 $"OpenNIC 7" off \
13 $"PowerNS" off \
14 $"ValiDOM" off \
15 $"Freie Unzensierte" off \
16 $"Google" off 2> $data
sel=$?
case $sel in
1) exit 1;;
@ -949,8 +949,8 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--radiolist "Choose Dynamic DNS provider:" 15 40 14 \
dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Choose Dynamic DNS provider:" 15 40 14 \
1 dyndns off \
2 freedns on \
3 zoneedit off \
@ -993,8 +993,8 @@ function interactive_configuration {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--inputbox "Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) DDNS_USERNAME=$(cat $data);;
@ -1008,10 +1008,10 @@ function interactive_configuration {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
dialog --backtitle $"Freedombone Configuration" \
--clear \
--insecure \
--passwordbox "Dynamic DNS provider password" 10 30 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
--passwordbox $"Dynamic DNS provider password" 10 30 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) DDNS_PASSWORD=$(cat $data);;
@ -1019,7 +1019,7 @@ function interactive_configuration {
255) exit 1;;
esac
if [ ${#DDNS_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters. You may need to change your password on the dynamic DNS provider's web site." 10 40
dialog --title $"Password quality check" --msgbox $"The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters. You may need to change your password on the dynamic DNS provider's web site." 10 40
DDNS_PASSWORD=""
fi
done
@ -1031,8 +1031,8 @@ function interactive_configuration {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--inputbox "Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
0) MY_NAME=$(cat $data);;
@ -1057,11 +1057,11 @@ function interactive_configuration {
fi
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--title "Local Network Configuration" \
--form "\nPlease enter the IP addresses:" 11 55 3 \
"This system:" 1 1 "$LOCAL_NETWORK_STATIC_IP_ADDRESS" 1 16 16 15 \
"Internet router:" 2 1 "$ROUTER_IP_ADDRESS" 2 16 16 15 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Local Network Configuration" \
--form $"\nPlease enter the IP addresses:" 11 55 3 \
$"This system:" 1 1 "$LOCAL_NETWORK_STATIC_IP_ADDRESS" 1 16 16 15 \
$"Internet router:" 2 1 "$ROUTER_IP_ADDRESS" 2 16 16 15 \
2> $data
sel=$?
case $sel in
@ -1080,19 +1080,19 @@ function interactive_configuration {
trap "rm -f $data" 0 1 2 5 15
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle "Freedombone Configuration" \
--title "Wiki Configuration" \
--form "\nPlease enter your wiki details:" 11 55 4 \
"Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
"Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
"Code:" 3 1 "$(grep 'WIKI_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 40 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Wiki Configuration" \
--form $"\nPlease enter your wiki details:" 11 55 4 \
$"Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
$"Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
$"Code:" 3 1 "$(grep 'WIKI_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 40 \
2> $data
else
dialog --backtitle "Freedombone Configuration" \
--title "Wiki Configuration" \
--form "\nPlease enter your wiki details:" 11 55 3 \
"Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
"Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Wiki Configuration" \
--form $"\nPlease enter your wiki details:" 11 55 3 \
$"Title:" 1 1 "$(grep 'WIKI_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
$"Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
2> $data
fi
sel=$?
@ -1107,13 +1107,13 @@ function interactive_configuration {
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $WIKI_DOMAIN_NAME ]]; then
WIKI_DOMAIN_NAME=
dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
WIKI_CODE=$(cat $data | sed -n 3p)
if [ ${#WIKI_CODE} -lt 30 ]; then
WIKI_DOMAIN_NAME=
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
fi
fi
fi
@ -1132,19 +1132,19 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle "Freedombone Configuration" \
--title "Blog Configuration" \
--form "\nPlease enter your blog details:" 11 55 4 \
"Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
"Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
"Code:" 3 1 "$(grep 'FULLBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Blog Configuration" \
--form $"\nPlease enter your blog details:" 11 55 4 \
$"Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
$"Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
$"Code:" 3 1 "$(grep 'FULLBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 30 \
2> $data
else
dialog --backtitle "Freedombone Configuration" \
--title "Blog Configuration" \
--form "\nPlease enter your blog details:" 11 55 3 \
"Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
"Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Blog Configuration" \
--form $"\nPlease enter your blog details:" 11 55 3 \
$"Title:" 1 1 "$(grep 'MY_BLOG_TITLE' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
$"Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
2> $data
fi
sel=$?
@ -1162,13 +1162,13 @@ function interactive_configuration {
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $FULLBLOG_DOMAIN_NAME ]]; then
FULLBLOG_DOMAIN_NAME=
dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
FULLBLOG_CODE=$(cat $data | sed -n 3p)
if [ ${#FULLBLOG_CODE} -lt 30 ]; then
FULLBLOG_DOMAIN_NAME=
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
fi
fi
fi
@ -1187,17 +1187,17 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle "Freedombone Configuration" \
--title "Owncloud Configuration" \
--form "\nPlease enter your Owncloud details:" 11 55 3 \
"Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
"Code:" 2 1 "$(grep 'OWNCLOUD_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Owncloud Configuration" \
--form $"\nPlease enter your Owncloud details:" 11 55 3 \
$"Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
$"Code:" 2 1 "$(grep 'OWNCLOUD_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
2> $data
else
dialog --backtitle "Freedombone Configuration" \
--title "Owncloud Configuration" \
--form "\nPlease enter your Owncloud details:" 11 55 3 \
"Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Owncloud Configuration" \
--form $"\nPlease enter your Owncloud details:" 11 55 3 \
$"Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
2> $data
fi
sel=$?
@ -1211,13 +1211,13 @@ function interactive_configuration {
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $OWNCLOUD_DOMAIN_NAME ]]; then
OWNCLOUD_DOMAIN_NAME=
dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
OWNCLOUD_CODE=$(cat $data | sed -n 2p)
if [ ${#OWNCLOUD_CODE} -lt 30 ]; then
OWNCLOUD_DOMAIN_NAME=
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
fi
fi
fi
@ -1236,17 +1236,17 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle "Freedombone Configuration" \
--title "Hubzilla Configuration" \
--form "\nPlease enter your Hubzilla details:" 11 55 3 \
"Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
"Code:" 2 1 "$(grep 'HUBZILLA_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Hubzilla Configuration" \
--form $"\nPlease enter your Hubzilla details:" 11 55 3 \
$"Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
$"Code:" 2 1 "$(grep 'HUBZILLA_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
2> $data
else
dialog --backtitle "Freedombone Configuration" \
--title "Hubzilla Configuration" \
--form "\nPlease enter your Hubzilla details:" 11 55 3 \
"Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Hubzilla Configuration" \
--form $"\nPlease enter your Hubzilla details:" 11 55 3 \
$"Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
2> $data
fi
sel=$?
@ -1260,13 +1260,13 @@ function interactive_configuration {
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $HUBZILLA_DOMAIN_NAME ]]; then
HUBZILLA_DOMAIN_NAME=
dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
HUBZILLA_CODE=$(cat $data | sed -n 2p)
if [ ${#HUBZILLA_CODE} -lt 30 ]; then
HUBZILLA_DOMAIN_NAME=
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
fi
fi
fi
@ -1285,17 +1285,17 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle "Freedombone Configuration" \
--title "Microblog Configuration" \
--form "\nPlease enter your Microblog details:" 11 55 3 \
"Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
"Code:" 2 1 "$(grep 'MICROBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Microblog Configuration" \
--form $"\nPlease enter your Microblog details:" 11 55 3 \
$"Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
$"Code:" 2 1 "$(grep 'MICROBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
2> $data
else
dialog --backtitle "Freedombone Configuration" \
--title "Microblog Configuration" \
--form "\nPlease enter your Microblog details:" 11 55 3 \
"Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Microblog Configuration" \
--form $"\nPlease enter your Microblog details:" 11 55 3 \
$"Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
2> $data
fi
sel=$?
@ -1312,13 +1312,13 @@ function interactive_configuration {
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $MICROBLOG_DOMAIN_NAME ]]; then
MICROBLOG_DOMAIN_NAME=
dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
MICROBLOG_CODE=$(cat $data | sed -n 2p)
if [ ${#MICROBLOG_CODE} -lt 30 ]; then
MICROBLOG_DOMAIN_NAME=
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
fi
fi
fi
@ -1338,17 +1338,17 @@ function interactive_configuration {
trap "rm -f $data" 0 1 2 5 15
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle "Freedombone Configuration" \
--title "Developer Configuration" \
--form "\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 3 \
"Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
"Code:" 2 1 "$(grep 'GIT_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Developer Configuration" \
--form $"\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 3 \
$"Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
$"Code:" 2 1 "$(grep 'GIT_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
2> $data
else
dialog --backtitle "Freedombone Configuration" \
--title "Developer Configuration" \
--form "\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 2 \
"Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Developer Configuration" \
--form $"\nPlease enter your Git hosting site details.\nIf You don't need developer tools then just select Ok" 11 55 2 \
$"Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
2> $data
fi
sel=$?
@ -1362,13 +1362,13 @@ function interactive_configuration {
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $GIT_DOMAIN_NAME ]]; then
GIT_DOMAIN_NAME=
dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
GIT_CODE=$(cat $data | sed -n 2p)
if [ ${#GIT_CODE} -lt 30 ]; then
GIT_DOMAIN_NAME=
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
fi
fi
fi
@ -1389,11 +1389,11 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle "Freedombone Configuration" \
--title "Default Domain" \
--form "\nWhich domain name should your email/XMPP/IRC/VoIP be associated with?" 11 55 3 \
"Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
dialog --backtitle $"Freedombone Configuration" \
--title $"Default Domain" \
--form $"\nWhich domain name should your email/XMPP/IRC/VoIP be associated with?" 11 55 3 \
$"Domain:" 1 1 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
$"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
2> $data
sel=$?
case $sel in
@ -1405,12 +1405,12 @@ function interactive_configuration {
if [ $DEFAULT_DOMAIN_NAME ]; then
if [ ${#DEFAULT_DOMAIN_CODE} -lt 30 ]; then
DEFAULT_DOMAIN_NAME=
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
fi
fi
else
dialog --backtitle "Freedombone Configuration" \
--inputbox "Which domain name should your email/XMPP/IRC/VoIP be associated with?" 10 45 \
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Which domain name should your email/XMPP/IRC/VoIP be associated with?" 10 45 \
"$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
sel=$?
case $sel in
@ -1424,7 +1424,7 @@ function interactive_configuration {
validate_domain_name
if [[ $TEST_DOMAIN_NAME != $DEFAULT_DOMAIN_NAME ]]; then
DEFAULT_DOMAIN_NAME=
dialog --title "Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
DEFAULT_DOMAIN_DETAILS_COMPLETE="yes"
fi
@ -1444,8 +1444,8 @@ function interactive_configuration {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Configuration" \
--inputbox "Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
dialog --backtitle $"Freedombone Configuration" \
--inputbox $"Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
sel=$?
case $sel in
0) MY_EMAIL_ADDRESS=$(cat $data);;
@ -1465,9 +1465,10 @@ function interactive_configuration {
function show_result {
clear
echo ''
echo "Configuration filename: $CONFIGURATION_FILE"
echo -n $"Configuration filename:"
echo " $CONFIGURATION_FILE"
echo ''
echo 'Contents:'
echo $'Contents:'
echo ''
cat $CONFIGURATION_FILE
echo ''

View File

@ -37,7 +37,7 @@ COMPLETION_FILE=$HOME/freedombone-completed.txt
SELECTED_USERNAME=
SIP_CONFIG_FILE=/etc/sipwitch.conf
ADMIN_USER=
UPGRADE_SCRIPT_NAME="freedombone-upgrade"
UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade"
function any_key {
echo ' '
@ -46,8 +46,8 @@ function any_key {
function check_for_updates {
if [ ! -f /etc/cron.weekly/$UPGRADE_SCRIPT_NAME ]; then
dialog --title "Check for updates" \
--msgbox "Upgrade script was not found" 6 40
dialog --title $"Check for updates" \
--msgbox $"Upgrade script was not found" 6 40
return
fi
@ -59,11 +59,11 @@ function check_for_updates {
function add_user {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Add new user" \
dialog --backtitle $"Freedombone Control Panel" \
--title $"Add new user" \
--form "\n" 8 40 3 \
"Username:" 1 1 "" 1 11 16 15 \
"ssh public key (optional):" 2 1 "" 3 1 40 10000 \
$"Username:" 1 1 "" 1 11 16 15 \
$"ssh public key (optional):" 2 1 "" 3 1 40 10000 \
2> $data
sel=$?
case $sel in
@ -73,13 +73,13 @@ function add_user {
new_user_username=$(cat $data | sed -n 1p)
new_user_ssh_public_key=$(cat $data | sed -n 2p)
if [ ${#new_user_username} -lt 2 ]; then
dialog --title "New username" \
--msgbox "No username was given" 6 40
dialog --title $"New username" \
--msgbox $"No username was given" 6 40
return
fi
if [[ "$new_user_username" == *" "* ]]; then
dialog --title "Invalid username" \
--msgbox "The username should not contain any spaces" 6 40
dialog --title $"Invalid username" \
--msgbox $"The username should not contain any spaces" 6 40
return
fi
if [ ${#new_user_ssh_public_key} -lt 20 ]; then
@ -92,8 +92,8 @@ function add_user {
freedombone-adduser "$new_user_username" "$new_user_ssh_public_key"
any_key
else
dialog --title "ssh public key" \
--msgbox "This does not look like an ssh public key" 6 40
dialog --title $"ssh public key" \
--msgbox $"This does not look like an ssh public key" 6 40
fi
fi
}
@ -103,7 +103,7 @@ function show_sip_extensions {
return;
fi
clear
echo "SIP phone extensions:"
echo $"SIP phone extensions:"
echo " "
while read ext; do
if [[ $ext == *"user id"* ]]; then
@ -123,7 +123,7 @@ function select_user {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title "Select a user" \
--backtitle "Freedombone Control Panel" \
--backtitle $"Freedombone Control Panel" \
--dselect "/home/" 14 40 2> $data
sel=$?
case $sel in
@ -135,8 +135,8 @@ function select_user {
SELECTED_USERNAME=
fi
if [ ! -d /home/$SELECTED_USERNAME/Maildir ]; then
dialog --title "User directory check" \
--msgbox "This does not look like a user directory" 6 40
dialog --title $"User directory check" \
--msgbox $"This does not look like a user directory" 6 40
SELECTED_USERNAME=
fi
}
@ -147,8 +147,8 @@ function delete_user {
return
fi
if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
dialog --title "Administrator user" \
--msgbox "You can't delete the administrator user" 6 40
dialog --title $"Administrator user" \
--msgbox $"You can't delete the administrator user" 6 40
return
fi
clear
@ -158,18 +158,18 @@ function delete_user {
function configure_remote_backups {
if ! grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
dialog --title "Administrator user" \
--msgbox "No Administrator user found. Check $COMPLETION_FILE" 6 40
dialog --title $"Administrator user" \
--msgbox $"No Administrator user found. Check $COMPLETION_FILE" 6 40
return
fi
if [ ${#ADMIN} -lt 2 ]; then
dialog --title "Administrator user" \
--msgbox "Username not found" 6 40
dialog --title $"Administrator user" \
--msgbox $"Username not found" 6 40
return
fi
if [ ! -d /home/$ADMIN_USER ]; then
dialog --title "Administrator user" \
--msgbox "Home directory not found" 6 40
dialog --title $"Administrator user" \
--msgbox $"Home directory not found" 6 40
return
fi
freedombone-remote -u $ADMIN_USER
@ -181,7 +181,8 @@ function change_password {
return
fi
clear
echo "Change password for $SELECTED_USERNAME"
echo -n $"Change password for"
echo " $SELECTED_USERNAME"
echo ""
su -c "passwd" - $SELECTED_USERNAME
any_key
@ -194,10 +195,10 @@ function change_ssh_public_key {
fi
if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
dialog --title "Change ssh public key" \
--backtitle "Freedombone Control Panel" \
dialog --title $"Change ssh public key" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno "\nThis is the administrator user.\n\nAre you sure you want to change the ssh public key for the administrator?" 10 60
--yesno $"\nThis is the administrator user.\n\nAre you sure you want to change the ssh public key for the administrator?" 10 60
sel=$?
case $sel in
1) return;;
@ -207,9 +208,9 @@ function change_ssh_public_key {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title "Change ssh public key for $SELECTED_USERNAME" \
--backtitle "Freedombone Control Panel" \
--inputbox "Paste the ssh public key below" 8 60 2>$data
dialog --title $"Change ssh public key for $SELECTED_USERNAME" \
--backtitle $"Freedombone Control Panel" \
--inputbox $"Paste the ssh public key below" 8 60 2>$data
sel=$?
case $sel in
0)
@ -224,8 +225,8 @@ function change_ssh_public_key {
/home/$SELECTED_USERNAME/.ssh/authorized_keys
chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
/home/$SELECTED_USERNAME/.ssh
dialog --title "Change ssh public key" \
--msgbox "ssh public key was installed" 6 40
dialog --title $"Change ssh public key" \
--msgbox $"ssh public key was installed" 6 40
else
if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then
if [ ! -d /home/$SELECTED_USERNAME/.ssh ]; then
@ -235,8 +236,8 @@ function change_ssh_public_key {
/home/$SELECTED_USERNAME/.ssh/authorized_keys
chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
/home/$SELECTED_USERNAME/.ssh
dialog --title "Change ssh public key" \
--msgbox "ssh public key was installed" 6 40
dialog --title $"Change ssh public key" \
--msgbox $"ssh public key was installed" 6 40
fi
fi
fi
@ -252,12 +253,12 @@ function add_to_mailing_list {
fi
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Subscribe $SELECTED_USERNAME to a mailing list" \
dialog --backtitle $"Freedombone Control Panel" \
--title $"Subscribe $SELECTED_USERNAME to a mailing list" \
--form "\n" 8 68 4 \
"List folder name:" 1 1 "" 1 35 26 25 \
"Name between [] on subject line:" 2 1 "" 2 35 26 25 \
"List email address:" 3 1 "" 3 35 26 25 \
$"List folder name:" 1 1 "" 1 35 26 25 \
$"Name between [] on subject line:" 2 1 "" 2 35 26 25 \
$"List email address:" 3 1 "" 3 35 26 25 \
2> $data
sel=$?
case $sel in
@ -269,30 +270,30 @@ function add_to_mailing_list {
LIST_EMAIL=$(cat $data | sed -n 3p)
if [ ${#LIST_NAME} -lt 2 ]; then
dialog --title "Add mailing list" \
--msgbox "No mailing list name was given" 6 40
dialog --title $"Add mailing list" \
--msgbox $"No mailing list name was given" 6 40
return
fi
if [ ${#LIST_SUBJECT} -lt 2 ]; then
dialog --title "Add mailing list" \
--msgbox "No mailing list subject was given" 6 40
dialog --title $"Add mailing list" \
--msgbox $"No mailing list subject was given" 6 40
return
fi
if [ ${#LIST_EMAIL} -lt 2 ]; then
dialog --title "Add mailing list" \
--msgbox "No mailing list email address was given" 6 40
dialog --title $"Add mailing list" \
--msgbox $"No mailing list email address was given" 6 40
return
fi
if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
dialog --title "Add mailing list" \
--msgbox "Unrecognised email address" 6 40
dialog --title $"Add mailing list" \
--msgbox $"Unrecognised email address" 6 40
return
fi
freedombone-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
-s "$LIST_SUBJECT" -e "$LIST_EMAIL"
dialog --title "Add mailing list" \
--msgbox "$LIST_NAME list was added" 6 40
dialog --title $"Add mailing list" \
--msgbox $"$LIST_NAME list was added" 6 40
}
function email_rule {
@ -302,11 +303,11 @@ function email_rule {
fi
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Email rule for user $SELECTED_USERNAME" \
dialog --backtitle $"Freedombone Control Panel" \
--title $"Email rule for user $SELECTED_USERNAME" \
--form "\n" 8 65 3 \
"When email arrives from address:" 1 1 "" 1 35 24 28 \
"Move to folder:" 2 1 "" 2 35 24 28 \
$"When email arrives from address:" 1 1 "" 1 35 24 28 \
$"Move to folder:" 2 1 "" 2 35 24 28 \
2> $data
sel=$?
case $sel in
@ -317,25 +318,25 @@ function email_rule {
RULE_FOLDER=$(cat $data | sed -n 2p)
if [ ${#RULE_EMAIL} -lt 2 ]; then
dialog --title "Add email rule" \
--msgbox "No email address was given" 6 40
dialog --title $"Add email rule" \
--msgbox $"No email address was given" 6 40
return
fi
if [ ${#RULE_FOLDER} -lt 2 ]; then
dialog --title "Add email rule" \
--msgbox "No folder name was given" 6 40
dialog --title $"Add email rule" \
--msgbox $"No folder name was given" 6 40
return
fi
if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
dialog --title "Add email rule" \
--msgbox "Unrecognised email address" 6 40
dialog --title $"Add email rule" \
--msgbox $"Unrecognised email address" 6 40
return
fi
freedombone-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
-g "$RULE_FOLDER"
dialog --title "Add email rule" \
--msgbox "Email rule for $RULE_EMAIL was added" 6 40
dialog --title $"Add email rule" \
--msgbox $"Email rule for $RULE_EMAIL was added" 6 40
}
function block_unblock_email {
@ -343,13 +344,14 @@ function block_unblock_email {
if [ ! $SELECTED_USERNAME ]; then
return
fi
blockstr=$"Block/Unblock email going to"
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Block/Unblock email going to $SELECTED_USERNAME" \
dialog --backtitle $"Freedombone Control Panel" \
--title "$blockstr $SELECTED_USERNAME" \
--form "\n" 8 65 3 \
"When email arrives from address:" 1 1 "" 1 35 24 28 \
"Block it:" 2 1 "yes" 2 35 4 4 \
$"When email arrives from address:" 1 1 "" 1 35 24 28 \
$"Block it:" 2 1 "yes" 2 35 4 4 \
2> $data
sel=$?
case $sel in
@ -359,22 +361,22 @@ function block_unblock_email {
BLOCK_EMAIL=$(cat $data | sed -n 1p)
BLOCK=$(cat $data | sed -n 2p)
if [ ${#BLOCK_EMAIL} -lt 2 ]; then
dialog --title "Block/Unblock an email" \
--msgbox "No email address was given" 6 40
dialog --title $"Block/Unblock an email" \
--msgbox $"No email address was given" 6 40
return
fi
if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
dialog --title "Block/Unblock an email" \
--msgbox "Unrecognised email address" 6 40
dialog --title $"Block/Unblock an email" \
--msgbox $"Unrecognised email address" 6 40
return
fi
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
freedombone-ignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
dialog --title "Block an email" \
dialog --title $"Block an email" \
--msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME blocked" 6 40
else
freedombone-unignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
dialog --title "Unblock an email" \
dialog --title $"Unblock an email" \
--msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 40
fi
}
@ -384,13 +386,14 @@ function block_unblock_subject {
if [ ! $SELECTED_USERNAME ]; then
return
fi
blockstr=$"Block/Unblock email going to"
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Block/Unblock email going to $SELECTED_USERNAME" \
dialog --backtitle $"Freedombone Control Panel" \
--title "$blockstr $SELECTED_USERNAME" \
--form "\n" 8 70 3 \
"When email arrives with subject text:" 1 1 "" 1 40 24 28 \
"Block it:" 2 1 "yes" 2 40 4 4 \
$"When email arrives with subject text:" 1 1 "" 1 40 24 28 \
$"Block it:" 2 1 "yes" 2 40 4 4 \
2> $data
sel=$?
case $sel in
@ -400,17 +403,17 @@ function block_unblock_subject {
BLOCK_SUBJECT=$(cat $data | sed -n 1p)
BLOCK=$(cat $data | sed -n 2p)
if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
dialog --title "Block/Unblock an email" \
--msgbox "No subject was given" 6 40
dialog --title $"Block/Unblock an email" \
--msgbox $"No subject was given" 6 40
return
fi
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
freedombone-ignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
dialog --title "Block an email" \
dialog --title $"Block an email" \
--msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME blocked" 6 40
else
freedombone-unignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
dialog --title "Unblock an email" \
dialog --title $"Unblock an email" \
--msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40
fi
}
@ -420,8 +423,8 @@ function create_keydrive_master {
if [ ! $SELECTED_USERNAME ]; then
return
fi
dialog --title "USB Master Keydrive" \
--msgbox "Plug in a LUKS encrypted USB drive" 6 40
dialog --title $"USB Master Keydrive" \
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
clear
freedombone-keydrive -u $SELECTED_USERNAME --master 'yes'
any_key
@ -432,44 +435,44 @@ function create_keydrive_fragment {
if [ ! $SELECTED_USERNAME ]; then
return
fi
dialog --title "USB Fragment Keydrive" \
--msgbox "Plug in a LUKS encrypted USB drive" 6 40
dialog --title $"USB Fragment Keydrive" \
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
clear
freedombone-keydrive -u $SELECTED_USERNAME
any_key
}
function backup_data {
dialog --title "Backup data to USB" \
--msgbox "Plug in a LUKS encrypted USB drive" 6 40
dialog --title $"Backup data to USB" \
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
clear
echo ' '
echo 'Enter the passphrase for your LUKS encrypted backup drive:'
echo $'Enter the passphrase for your LUKS encrypted backup drive:'
backup
any_key
}
function restore_data {
dialog --title "Restore data from USB" \
--msgbox "Plug in your backup USB drive" 6 40
dialog --title $"Restore data from USB" \
--msgbox $"Plug in your backup USB drive" 6 40
clear
echo ' '
echo 'Enter the passphrase for your LUKS encrypted backup drive:'
echo $'Enter the passphrase for your LUKS encrypted backup drive:'
restore
any_key
}
function restore_data_remote {
if [ ! $ADMIN_USER ]; then
dialog --title "Restore data from remote server" \
--msgbox "Unknown admin user" 6 40
dialog --title $"Restore data from remote server" \
--msgbox $"Unknown admin user" 6 40
return
fi
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title "Restore from remote server" \
--backtitle "Freedombone Control Panel" \
--inputbox "Enter the domain name of the server from which you wish to restore" 8 60 2>$data
dialog --title $"Restore from remote server" \
--backtitle $"Freedombone Control Panel" \
--inputbox $"Enter the domain name of the server from which you wish to restore" 8 60 2>$data
sel=$?
case $sel in
0)
@ -480,8 +483,8 @@ function restore_data_remote {
fi
if [[ $friend_server_domain_name != *"."* ]]; then
dialog --title "Remote server domain name" \
--msgbox "Invalid domain name" 6 40
dialog --title $"Remote server domain name" \
--msgbox $"Invalid domain name" 6 40
return
fi
@ -493,9 +496,9 @@ function restore_data_remote {
function logging_on_off {
logging="no"
dialog --title "Logging" \
--backtitle "Freedombone Control Panel" \
--yesno "\nDo you want to turn logging on?" 7 60
dialog --title $"Logging" \
--backtitle $"Freedombone Control Panel" \
--yesno $"\nDo you want to turn logging on?" 7 60
sel=$?
case $sel in
0) logging="yes";;
@ -504,7 +507,7 @@ function logging_on_off {
clear
echo ''
echo 'This may take a few seconds. Please wait...'
echo $'This may take a few seconds. Please wait...'
if [[ $logging == "no" ]]; then
freedombone-logging off
else
@ -517,8 +520,9 @@ function restore_gpg_key {
if [ ! $SELECTED_USERNAME ]; then
return
fi
dialog --title "Restore GPG key for user $SELECTED_USERNAME" \
--msgbox "Plug in your USB keydrive" 6 40
restorestr=$"Restore GPG key for user"
dialog --title "$restorestr $SELECTED_USERNAME" \
--msgbox $"Plug in your USB keydrive" 6 40
clear
freedombone-recoverkey -u $SELECTED_USERNAME
any_key
@ -531,7 +535,7 @@ function security_settings {
function reset_tripwire {
clear
echo 'Resetting the Tripwire...'
echo $'Resetting the Tripwire...'
echo ' '
echo '
@ -540,9 +544,9 @@ function reset_tripwire {
}
function hubzilla_renew_cert {
dialog --title "Renew SSL certificate" \
--backtitle "Freedombone Control Panel" \
--yesno "\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
dialog --title $"Renew SSL certificate" \
--backtitle $"Freedombone Control Panel" \
--yesno $"\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
sel=$?
case $sel in
1) return;;
@ -550,51 +554,51 @@ function hubzilla_renew_cert {
esac
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
dialog --title "Renew SSL certificate" \
--msgbox "Hubzilla install directory not found" 6 40
dialog --title $"Renew SSL certificate" \
--msgbox $"Hubzilla install directory not found" 6 40
return
fi
freedombone-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
if [ ! "$?" = "0" ]; then
any_key
else
dialog --title "Renew SSL certificate" \
--msgbox "Hubzilla certificate has been renewed" 6 40
dialog --title $"Renew SSL certificate" \
--msgbox $"Hubzilla certificate has been renewed" 6 40
fi
}
function hubzilla_restore {
dialog --title "Restore hubzilla from USB backup" \
--backtitle "Freedombone Control Panel" \
--yesno "\nInsert your USB backup drive and select 'yes' to continue" 16 60
dialog --title $"Restore hubzilla from USB backup" \
--backtitle $"Freedombone Control Panel" \
--yesno $"\nInsert your USB backup drive and select 'yes' to continue" 16 60
sel=$?
case $sel in
1) return;;
255) return;;
esac
clear
echo 'Enter your backup drive password:'
echo $'Enter your backup drive password:'
restorehubzilla
}
function hubzilla_channel_directory_server {
if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
dialog --title "Hubzilla channel directory server" \
--msgbox "Hubzilla is not installed on this system" 6 40
dialog --title $"Hubzilla channel directory server" \
--msgbox $"Hubzilla is not installed on this system" 6 40
return
fi
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
dialog --title "Hubzilla channel directory server" \
--msgbox "Hubzilla install directory not found" 6 40
dialog --title $"Hubzilla channel directory server" \
--msgbox $"Hubzilla install directory not found" 6 40
return
fi
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title "Hubzilla channel directory server" \
--backtitle "Freedombone Control Panel" \
--inputbox "When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
dialog --title $"Hubzilla channel directory server" \
--backtitle $"Freedombone Control Panel" \
--inputbox $"When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
sel=$?
case $sel in
0)
@ -603,13 +607,13 @@ function hubzilla_channel_directory_server {
return
fi
if [[ $hubzilla_domain_server != "https"* ]]; then
dialog --title "Hubzilla channel directory server" \
--msgbox "Invalid domain - include the https://" 6 40
dialog --title $"Hubzilla channel directory server" \
--msgbox $"Invalid domain - include the https://" 6 40
return
fi
./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
dialog --title "Hubzilla channel directory server" \
--msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40
dialog --title $"Hubzilla channel directory server" \
--msgbox $"Domain channel directory server changed to $hubzilla_domain_server" 6 40
;;
esac
}
@ -618,14 +622,14 @@ function format_drive {
drive=
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Format a USB drive (LUKS encrypted)" \
--radiolist "Choose a drive:" 12 70 5 \
1 "sda (Beaglebone Black)" off \
2 "sdb" off \
3 "sdc" off \
4 "sdd" off \
5 "Back to Backup and Restore menu" on 2> $data
dialog --backtitle $"Freedombone Control Panel" \
--title $"Format a USB drive (LUKS encrypted)" \
--radiolist $"Choose a drive:" 12 70 5 \
1 $"sda (Beaglebone Black)" off \
2 $"sdb" off \
3 $"sdc" off \
4 $"sdd" off \
5 $"Back to Backup and Restore menu" on 2> $data
sel=$?
case $sel in
1) return;;
@ -639,10 +643,10 @@ function format_drive {
5) return;;
esac
dialog --title "Format USB drive" \
--backtitle "Freedombone Control Panel" \
dialog --title $"Format USB drive" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno "\nPlease confirm that you wish to format drive\n\n ${drive}\n\nAll current data on the drive will be lost, and you will be prompted to give a password used to encrypt the drive.\n\nDANGER: If you screw up here and format the wrong drive it's your own fault!" 16 60
--yesno $"\nPlease confirm that you wish to format drive\n\n ${drive}\n\nAll current data on the drive will be lost, and you will be prompted to give a password used to encrypt the drive.\n\nDANGER: If you screw up here and format the wrong drive it's your own fault!" 16 60
sel=$?
case $sel in
1) return;;
@ -655,10 +659,10 @@ function format_drive {
}
function shut_down_system {
dialog --title "Power off the system" \
--backtitle "Freedombone Control Panel" \
dialog --title $"Power off the system" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno "\nPlease confirm that you wish to power off the system.\n\nWARNING: to power on again you will need to have physical access to the hardware." 10 60
--yesno $"\nPlease confirm that you wish to power off the system.\n\nWARNING: to power on again you will need to have physical access to the hardware." 10 60
sel=$?
case $sel in
1) return;;
@ -668,10 +672,10 @@ function shut_down_system {
}
function restart_system {
dialog --title "Restart the system" \
--backtitle "Freedombone Control Panel" \
dialog --title $"Restart the system" \
--backtitle $"Freedombone Control Panel" \
--defaultno \
--yesno "\nPlease confirm that you wish to restart the system.\n\nWARNING: If you are using full disk encryption then you will need physical access to the hardware to type in the password" 10 60
--yesno $"\nPlease confirm that you wish to restart the system.\n\nWARNING: If you are using full disk encryption then you will need physical access to the hardware to type in the password" 10 60
sel=$?
case $sel in
1) return;;
@ -685,19 +689,19 @@ function menu_backup_restore {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Backup and Restore" \
--radiolist "Choose an operation:" 17 70 10 \
1 "Backup data to USB drive" off \
2 "Restore GPG key from USB keydrive" off \
3 "Restore data from USB drive" off \
4 "Restore Hubzilla data from USB drive" off \
5 "Configure remote backups" off \
6 "Restore from remote backup" off \
7 "Backup GPG key to USB (master keydrive)" off \
8 "Backup GPG key to USB (fragment keydrive)" off \
9 "Format a USB drive (LUKS encrypted)" off \
10 "Back to main menu" on 2> $data
dialog --backtitle $"Freedombone Control Panel" \
--title $"Backup and Restore" \
--radiolist $"Choose an operation:" 17 70 10 \
1 $"Backup data to USB drive" off \
2 $"Restore GPG key from USB keydrive" off \
3 $"Restore data from USB drive" off \
4 $"Restore Hubzilla data from USB drive" off \
5 $"Configure remote backups" off \
6 $"Restore from remote backup" off \
7 $"Backup GPG key to USB (master keydrive)" off \
8 $"Backup GPG key to USB (fragment keydrive)" off \
9 $"Format a USB drive (LUKS encrypted)" off \
10 $"Back to main menu" on 2> $data
sel=$?
case $sel in
1) break;;
@ -723,14 +727,14 @@ function menu_email {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Email Filtering Rules" \
--radiolist "Choose an operation:" 12 70 5 \
1 "Add a user to a mailing list" off \
2 "Add an email rule" off \
3 "Block/Unblock an email address" off \
4 "Block/Unblock email with subject text" off \
5 "Back to main menu" on 2> $data
dialog --backtitle $"Freedombone Control Panel" \
--title $"Email Filtering Rules" \
--radiolist $"Choose an operation:" 12 70 5 \
1 $"Add a user to a mailing list" off \
2 $"Add an email rule" off \
3 $"Block/Unblock an email address" off \
4 $"Block/Unblock email with subject text" off \
5 $"Back to main menu" on 2> $data
sel=$?
case $sel in
1) break;;
@ -751,14 +755,14 @@ function menu_users {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Manage Users" \
--radiolist "Choose an operation:" 12 70 5 \
1 "Add a user" off \
2 "Delete a user" off \
3 "Change user password" off \
4 "Change user ssh public key" off \
5 "Back to main menu" on 2> $data
dialog --backtitle $"Freedombone Control Panel" \
--title $"Manage Users" \
--radiolist $"Choose an operation:" 12 70 5 \
1 $"Add a user" off \
2 $"Delete a user" off \
3 $"Change user password" off \
4 $"Change user ssh public key" off \
5 $"Back to main menu" on 2> $data
sel=$?
case $sel in
1) break;;
@ -779,13 +783,13 @@ function menu_hubzilla {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Hubzilla" \
--radiolist "Choose an operation:" 13 70 4 \
1 "Restore from usb backup" off \
2 "Set channel directory server" off \
3 "Renew SSL certificate" off \
4 "Back to main menu" on 2> $data
dialog --backtitle $"Freedombone Control Panel" \
--title $"Hubzilla" \
--radiolist $"Choose an operation:" 13 70 4 \
1 $"Restore from usb backup" off \
2 $"Set channel directory server" off \
3 $"Renew SSL certificate" off \
4 $"Back to main menu" on 2> $data
sel=$?
case $sel in
1) break;;
@ -805,21 +809,21 @@ function menu_top_level {
do
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle "Freedombone Control Panel" \
--title "Control Panel" \
--radiolist "Choose an operation:" 19 70 12 \
1 "Backup and Restore" off \
2 "Show SIP Phone Extensions" off \
3 "Reset Tripwire" off \
4 "Logging on/off" off \
5 "Manage Users" off \
6 "Email Filtering Rules" off \
7 "Security Settings" off \
8 "Hubzilla" off \
9 "Check for updates" off \
10 "Power off the system" off \
11 "Restart the system" off \
12 "Exit" on 2> $data
dialog --backtitle $"Freedombone Control Panel" \
--title $"Control Panel" \
--radiolist $"Choose an operation:" 19 70 12 \
1 $"Backup and Restore" off \
2 $"Show SIP Phone Extensions" off \
3 $"Reset Tripwire" off \
4 $"Logging on/off" off \
5 $"Manage Users" off \
6 $"Email Filtering Rules" off \
7 $"Security Settings" off \
8 $"Hubzilla" off \
9 $"Check for updates" off \
10 $"Power off the system" off \
11 $"Restart the system" off \
12 $"Exit" on 2> $data
sel=$?
case $sel in
1) exit 1;;
@ -843,7 +847,7 @@ function menu_top_level {
}
if [ ! -f $COMPLETION_FILE ]; then
echo 'This command should only be run on an installed Freedombone system'
echo $'This command should only be run on an installed Freedombone system'
exit 1
fi