Beginning translation strings
This commit is contained in:
parent
6fc3017853
commit
2558225fb5
|
@ -104,16 +104,16 @@ DH_KEYLENGTH=
|
||||||
|
|
||||||
function show_help {
|
function show_help {
|
||||||
echo ''
|
echo ''
|
||||||
echo 'freedombone-config -f [config filename] -m [min password length]'
|
echo $'freedombone-config -f [config filename] -m [min password length]'
|
||||||
echo ''
|
echo ''
|
||||||
echo 'Creates an inventory of remote backup locations'
|
echo $'Creates an inventory of remote backup locations'
|
||||||
echo ''
|
echo ''
|
||||||
echo ''
|
echo ''
|
||||||
echo ' -h --help Show help'
|
echo $' -h --help Show help'
|
||||||
echo ' -f --filename Configuration file (usually freedombone.cfg)'
|
echo $' -f --filename Configuration file (usually freedombone.cfg)'
|
||||||
echo ' -m --min Minimum password length (characters)'
|
echo $' -m --min Minimum password length (characters)'
|
||||||
echo ' -w --www Freedombone web site'
|
echo $' -w --www Freedombone web site'
|
||||||
echo ' -b --bm Freedombone support Bitmessage address'
|
echo $' -b --bm Freedombone support Bitmessage address'
|
||||||
echo ''
|
echo ''
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
@ -276,15 +276,15 @@ function interactive_gpg_from_remote {
|
||||||
freedombone-remote -u $MY_USERNAME -l $REMOTE_SERVERS_LIST -t "Remote server"
|
freedombone-remote -u $MY_USERNAME -l $REMOTE_SERVERS_LIST -t "Remote server"
|
||||||
|
|
||||||
if [ ! -f $REMOTE_SERVERS_LIST ]; then
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check the number of entries in the file
|
# check the number of entries in the file
|
||||||
no_of_servers=$(cat $REMOTE_SERVERS_LIST | wc -l)
|
no_of_servers=$(cat $REMOTE_SERVERS_LIST | wc -l)
|
||||||
if (( no_of_servers < 3 )); then
|
if (( no_of_servers < 3 )); then
|
||||||
dialog --title "Encryption keys" \
|
dialog --title $"Encryption keys" \
|
||||||
--msgbox 'There must be at least three servers to recover the key' 6 70
|
--msgbox $'There must be at least three servers to recover the key' 6 70
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -292,11 +292,11 @@ function interactive_gpg_from_remote {
|
||||||
apt-get -y install libgfshare-bin gnupg
|
apt-get -y install libgfshare-bin gnupg
|
||||||
freedombone-recoverkey -u $MY_USERNAME -l $REMOTE_SERVERS_LIST
|
freedombone-recoverkey -u $MY_USERNAME -l $REMOTE_SERVERS_LIST
|
||||||
if [ ! "$?" = "0" ]; then
|
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
|
return 3
|
||||||
fi
|
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
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -308,36 +308,36 @@ function reconstruct_key {
|
||||||
cd /home/$MY_USERNAME/.gnupg_fragments
|
cd /home/$MY_USERNAME/.gnupg_fragments
|
||||||
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
|
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
|
||||||
if (( no_of_shares < 4 )); then
|
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
|
exit 7348
|
||||||
fi
|
fi
|
||||||
apt-get -y install libgfshare-bin gnupg
|
apt-get -y install libgfshare-bin gnupg
|
||||||
gfcombine /home/$MY_USERNAME/.gnupg_fragments/keyshare*
|
gfcombine /home/$MY_USERNAME/.gnupg_fragments/keyshare*
|
||||||
if [ ! "$?" = "0" ]; then
|
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
|
exit 7348
|
||||||
fi
|
fi
|
||||||
|
|
||||||
KEYS_FILE=/home/$MY_USERNAME/.gnupg_fragments/keyshare.asc
|
KEYS_FILE=/home/$MY_USERNAME/.gnupg_fragments/keyshare.asc
|
||||||
if [ ! -f $KEYS_FILE ]; then
|
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
|
fi
|
||||||
|
|
||||||
su -c "gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
|
su -c "gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
echo 'Unable to import gpg key'
|
echo $'Unable to import gpg key'
|
||||||
shred -zu $KEYS_FILE
|
shred -zu $KEYS_FILE
|
||||||
rm -rf /home/$MY_USERNAME/.tempgnupg
|
rm -rf /home/$MY_USERNAME/.tempgnupg
|
||||||
exit 9654
|
exit 9654
|
||||||
fi
|
fi
|
||||||
shred -zu $KEYS_FILE
|
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 {
|
function interactive_gpg_from_usb {
|
||||||
dialog --title "Encryption keys" \
|
dialog --title $"Encryption keys" \
|
||||||
--msgbox 'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
|
--msgbox $'Plug in a USB drive containing a copy of your full key or key fragment' 6 70
|
||||||
|
|
||||||
HOME_DIR=/home/$MY_USERNAME
|
HOME_DIR=/home/$MY_USERNAME
|
||||||
GPG_LOADING="yes"
|
GPG_LOADING="yes"
|
||||||
|
@ -352,7 +352,7 @@ function interactive_gpg_from_usb {
|
||||||
reconstruct_key
|
reconstruct_key
|
||||||
return 0
|
return 0
|
||||||
fi
|
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
|
exit 739836
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -366,7 +366,7 @@ function interactive_gpg_from_usb {
|
||||||
reconstruct_key
|
reconstruct_key
|
||||||
return 0
|
return 0
|
||||||
fi
|
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
|
exit 27852
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -394,8 +394,8 @@ function interactive_gpg_from_usb {
|
||||||
reconstruct_key
|
reconstruct_key
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
dialog --title "Encryption keys" \
|
dialog --title $"Encryption keys" \
|
||||||
--msgbox "There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
|
--msgbox $"There was a problem mounting the USB drive to $GPG_USB_MOUNT" 6 70
|
||||||
rm -rf $GPG_USB_MOUNT
|
rm -rf $GPG_USB_MOUNT
|
||||||
exit 74393
|
exit 74393
|
||||||
fi
|
fi
|
||||||
|
@ -408,8 +408,8 @@ function interactive_gpg_from_usb {
|
||||||
reconstruct_key
|
reconstruct_key
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
dialog --title "Encryption keys" \
|
dialog --title $"Encryption keys" \
|
||||||
--msgbox "The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
|
--msgbox $"The directory $GPG_USB_MOUNT/.gnupg or $GPG_USB_MOUNT/.gnupg_fragments was not found" 6 70
|
||||||
umount -f $GPG_USB_MOUNT
|
umount -f $GPG_USB_MOUNT
|
||||||
rm -rf $GPG_USB_MOUNT
|
rm -rf $GPG_USB_MOUNT
|
||||||
exit 723814
|
exit 723814
|
||||||
|
@ -422,8 +422,8 @@ function interactive_gpg_from_usb {
|
||||||
fi
|
fi
|
||||||
cp -r $GPG_USB_MOUNT/.gnupg/* $HOME_DIR/.gnupg
|
cp -r $GPG_USB_MOUNT/.gnupg/* $HOME_DIR/.gnupg
|
||||||
GPG_LOADING="no"
|
GPG_LOADING="no"
|
||||||
dialog --title "Encryption keys" \
|
dialog --title $"Encryption keys" \
|
||||||
--msgbox "GPG Keyring loaded to $HOME_DIR" 6 70
|
--msgbox $"GPG Keyring loaded to $HOME_DIR" 6 70
|
||||||
else
|
else
|
||||||
if [ ! -d $HOME_DIR/.gnupg_fragments ]; then
|
if [ ! -d $HOME_DIR/.gnupg_fragments ]; then
|
||||||
mkdir $HOME_DIR/.gnupg_fragments
|
mkdir $HOME_DIR/.gnupg_fragments
|
||||||
|
@ -437,8 +437,8 @@ function interactive_gpg_from_usb {
|
||||||
mkdir $HOME_DIR/.ssh
|
mkdir $HOME_DIR/.ssh
|
||||||
fi
|
fi
|
||||||
cp $GPG_USB_MOUNT/.ssh/* $HOME_DIR/.ssh
|
cp $GPG_USB_MOUNT/.ssh/* $HOME_DIR/.ssh
|
||||||
dialog --title "Encryption keys" \
|
dialog --title $"Encryption keys" \
|
||||||
--msgbox "ssh keys imported" 6 70
|
--msgbox $"ssh keys imported" 6 70
|
||||||
SSH_IMPORTED="yes"
|
SSH_IMPORTED="yes"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -446,8 +446,8 @@ function interactive_gpg_from_usb {
|
||||||
umount -f $GPG_USB_MOUNT
|
umount -f $GPG_USB_MOUNT
|
||||||
rm -rf $GPG_USB_MOUNT
|
rm -rf $GPG_USB_MOUNT
|
||||||
if [[ $GPG_LOADING == "yes" ]]; then
|
if [[ $GPG_LOADING == "yes" ]]; then
|
||||||
dialog --title "Encryption keys" \
|
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
|
--msgbox $"Now remove the USB drive. Insert the next drive containing a key fragment, or select Ok to finish" 6 70
|
||||||
fi
|
fi
|
||||||
GPG_CTR=$((GPG_CTR + 1))
|
GPG_CTR=$((GPG_CTR + 1))
|
||||||
done
|
done
|
||||||
|
@ -460,11 +460,11 @@ function interactive_gpg {
|
||||||
GPG_CONFIGURED="yes"
|
GPG_CONFIGURED="yes"
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--radiolist "GPG/PGP keys for your system:" 13 70 3 \
|
--radiolist $"GPG/PGP keys for your system:" 13 70 3 \
|
||||||
1 "Generate new keys (new user)" on \
|
1 $"Generate new keys (new user)" on \
|
||||||
2 "Import keys from USB drive/s" off \
|
2 $"Import keys from USB drive/s" off \
|
||||||
3 "Retrieve keys from friends servers" off 2> $data
|
3 $"Retrieve keys from friends servers" off 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -489,25 +489,25 @@ function interactive_configuration {
|
||||||
cp $CONFIGURATION_FILE temp.cfg
|
cp $CONFIGURATION_FILE temp.cfg
|
||||||
fi
|
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)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--radiolist "Type of Installation:" 18 40 11 \
|
--radiolist $"Type of Installation:" 18 40 11 \
|
||||||
1 Full on \
|
1 $"Full" on \
|
||||||
2 Writer off \
|
2 $"Writer" off \
|
||||||
3 Cloud off \
|
3 $"Cloud" off \
|
||||||
4 Chat off \
|
4 $"Chat" off \
|
||||||
5 Mailbox off \
|
5 $"Mailbox" off \
|
||||||
6 Non-Mailbox off \
|
6 $"Non-Mailbox" off \
|
||||||
7 Social off \
|
7 $"Social" off \
|
||||||
8 Media off \
|
8 $"Media" off \
|
||||||
9 Developer off \
|
9 $"Developer" off \
|
||||||
10 "Mesh (router)" off \
|
10 $"Mesh (router)" off \
|
||||||
11 "Mesh (user device)" off 2> $data
|
11 $"Mesh (user device)" off 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -554,8 +554,8 @@ function interactive_configuration {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
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
|
--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=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) ESSID=$(cat $data);;
|
0) ESSID=$(cat $data);;
|
||||||
|
@ -567,8 +567,8 @@ function interactive_configuration {
|
||||||
if [[ $SYSTEM_TYPE != "$VARIANT_MESH_USER" ]]; then
|
if [[ $SYSTEM_TYPE != "$VARIANT_MESH_USER" ]]; then
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
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
|
--inputbox $"Give your mesh peer a name" 10 40 "$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) DEFAULT_DOMAIN_NAME=$(cat $data);;
|
0) DEFAULT_DOMAIN_NAME=$(cat $data);;
|
||||||
|
@ -582,8 +582,8 @@ function interactive_configuration {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--radiolist "Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
|
--radiolist $"Wifi Channel (spaced to be non-overlapping):" 11 50 4 \
|
||||||
1 "1" on \
|
1 "1" on \
|
||||||
2 "5" off \
|
2 "5" off \
|
||||||
3 "9" off \
|
3 "9" off \
|
||||||
|
@ -626,23 +626,23 @@ function interactive_configuration {
|
||||||
echo "| | (.-' (.-' ( | ( )| | | | )( )| | (.-' "
|
echo "| | (.-' (.-' ( | ( )| | | | )( )| | (.-' "
|
||||||
echo "' ' --' --' -' - -' ' ' -' -' -' ' - --'"
|
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 ''
|
||||||
echo 'To connect to the network open a terminal and type:'
|
echo $'To connect to the network open a terminal and type:'
|
||||||
echo ''
|
echo ''
|
||||||
echo ' meshweb'
|
echo ' meshweb'
|
||||||
echo ''
|
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 ''
|
||||||
echo ' sudo batman stop'
|
echo ' sudo batman stop'
|
||||||
echo ''
|
echo ''
|
||||||
echo 'To turn your system into a dedicated mesh peer you could add'
|
echo $'To turn your system into a dedicated mesh peer you could add'
|
||||||
echo 'the meshweb command to your startup applications'
|
echo $'the meshweb command to your startup applications'
|
||||||
echo ''
|
echo ''
|
||||||
touch /tmp/meshuserdevice
|
touch /tmp/meshuserdevice
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo 'Failed to fully install the mesh networking system'
|
echo $'Failed to fully install the mesh networking system'
|
||||||
exit 74589
|
exit 74589
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -652,8 +652,8 @@ function interactive_configuration {
|
||||||
else
|
else
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --title "Select the user account to install as" \
|
dialog --title $"Select the user account to install as" \
|
||||||
--backtitle "Freedombone Configuration" \
|
--backtitle $"Freedombone Configuration" \
|
||||||
--dselect "/home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 14 40 2> $data
|
--dselect "/home/$(grep 'MY_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 14 40 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -664,32 +664,32 @@ function interactive_configuration {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! $MY_USERNAME ]; then
|
if [ ! $MY_USERNAME ]; then
|
||||||
echo 'No user account was selected'
|
echo $'No user account was selected'
|
||||||
exit 64398
|
exit 64398
|
||||||
fi
|
fi
|
||||||
if [[ $MY_USERNAME == '-f' ]]; then
|
if [[ $MY_USERNAME == '-f' ]]; then
|
||||||
echo 'No user account was selected'
|
echo $'No user account was selected'
|
||||||
exit 8347
|
exit 8347
|
||||||
fi
|
fi
|
||||||
if [[ $MY_USERNAME == 'debian' ]]; then
|
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
|
exit 9341
|
||||||
fi
|
fi
|
||||||
if [ ! -d /home/$MY_USERNAME ]; then
|
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
|
exit 6437
|
||||||
fi
|
fi
|
||||||
save_configuration_file
|
save_configuration_file
|
||||||
|
|
||||||
if [[ $(grep "INSTALLING_ON_BBB" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
|
if [[ $(grep "INSTALLING_ON_BBB" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
|
||||||
dialog --title "Install Target" \
|
dialog --title $"Install Target" \
|
||||||
--backtitle "Freedombone Configuration" \
|
--backtitle $"Freedombone Configuration" \
|
||||||
--yesno "\nAre you installing onto a Beaglebone Black?" 7 60
|
--yesno $"\nAre you installing onto a Beaglebone Black?" 7 60
|
||||||
else
|
else
|
||||||
dialog --title "Install Target" \
|
dialog --title $"Install Target" \
|
||||||
--backtitle "Freedombone Configuration" \
|
--backtitle $"Freedombone Configuration" \
|
||||||
--defaultno \
|
--defaultno \
|
||||||
--yesno "\nAre you installing onto a Beaglebone Black?" 7 60
|
--yesno $"\nAre you installing onto a Beaglebone Black?" 7 60
|
||||||
fi
|
fi
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -712,14 +712,14 @@ function interactive_configuration {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
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
|
if [[ $(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" temp.cfg | awk -F '=' '{print $2}') == "yes" ]]; then
|
||||||
dialog --title "Social Key Management" \
|
dialog --title $"Social Key Management" \
|
||||||
--backtitle "Freedombone Configuration" \
|
--backtitle $"Freedombone Configuration" \
|
||||||
--yesno "$SOCIAL_KEY_STR" 15 60
|
--yesno "$SOCIAL_KEY_STR" 15 60
|
||||||
else
|
else
|
||||||
dialog --title "Social Key Management" \
|
dialog --title $"Social Key Management" \
|
||||||
--backtitle "Freedombone Configuration" \
|
--backtitle $"Freedombone Configuration" \
|
||||||
--defaultno \
|
--defaultno \
|
||||||
--yesno "$SOCIAL_KEY_STR" 15 60
|
--yesno "$SOCIAL_KEY_STR" 15 60
|
||||||
fi
|
fi
|
||||||
|
@ -734,8 +734,8 @@ function interactive_configuration {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
if [[ $INSTALLING_ON_BBB != "yes" ]]; then
|
if [[ $INSTALLING_ON_BBB != "yes" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--radiolist "Type of Random Number Generator:" 10 40 2 \
|
--radiolist $"Type of Random Number Generator:" 10 40 2 \
|
||||||
1 Haveged on \
|
1 Haveged on \
|
||||||
2 OneRNG off 2> $data
|
2 OneRNG off 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -745,8 +745,8 @@ function interactive_configuration {
|
||||||
esac
|
esac
|
||||||
case $(cat $data) in
|
case $(cat $data) in
|
||||||
2) HWRNG_TYPE="onerng"
|
2) HWRNG_TYPE="onerng"
|
||||||
dialog --title "OneRNG Device" \
|
dialog --title $"OneRNG Device" \
|
||||||
--msgbox "Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
|
--msgbox $"Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
|
||||||
;;
|
;;
|
||||||
255) exit 1;;
|
255) exit 1;;
|
||||||
esac
|
esac
|
||||||
|
@ -757,57 +757,57 @@ function interactive_configuration {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--radiolist "Where to download Debian packages from:" 25 45 49 \
|
--radiolist $"Where to download Debian packages from:" 25 45 49 \
|
||||||
1 "Australia" off \
|
1 $"Australia" off \
|
||||||
2 "Austria" off \
|
2 $"Austria" off \
|
||||||
3 "Belarus" off \
|
3 $"Belarus" off \
|
||||||
4 "Belgium" off \
|
4 $"Belgium" off \
|
||||||
5 "Bosnia and Herzegovina" off \
|
5 $"Bosnia and Herzegovina" off \
|
||||||
6 "Brazil" off \
|
6 $"Brazil" off \
|
||||||
7 "Bulgaria" off \
|
7 $"Bulgaria" off \
|
||||||
8 "Canada" off \
|
8 $"Canada" off \
|
||||||
9 "Chile" off \
|
9 $"Chile" off \
|
||||||
10 "China" off \
|
10 $"China" off \
|
||||||
11 "Croatia" off \
|
11 $"Croatia" off \
|
||||||
12 "Czech Republic" off \
|
12 $"Czech Republic" off \
|
||||||
13 "Denmark" off \
|
13 $"Denmark" off \
|
||||||
14 "El Salvador" off \
|
14 $"El Salvador" off \
|
||||||
15 "Estonia" off \
|
15 $"Estonia" off \
|
||||||
16 "Finland" off \
|
16 $"Finland" off \
|
||||||
17 "France 1" off \
|
17 $"France 1" off \
|
||||||
18 "France 2" off \
|
18 $"France 2" off \
|
||||||
19 "Germany 1" off \
|
19 $"Germany 1" off \
|
||||||
20 "Germany 2" off \
|
20 $"Germany 2" off \
|
||||||
21 "Greece" off \
|
21 $"Greece" off \
|
||||||
22 "Hungary" off \
|
22 $"Hungary" off \
|
||||||
23 "Iceland" off \
|
23 $"Iceland" off \
|
||||||
24 "Iran" off \
|
24 $"Iran" off \
|
||||||
25 "Ireland" off \
|
25 $"Ireland" off \
|
||||||
26 "Italy" off \
|
26 $"Italy" off \
|
||||||
27 "Japan" off \
|
27 $"Japan" off \
|
||||||
28 "Korea" off \
|
28 $"Korea" off \
|
||||||
29 "Lithuania" off \
|
29 $"Lithuania" off \
|
||||||
30 "Mexico" off \
|
30 $"Mexico" off \
|
||||||
31 "Netherlands" off \
|
31 $"Netherlands" off \
|
||||||
32 "New Caledonia" off \
|
32 $"New Caledonia" off \
|
||||||
33 "New Zealand" off \
|
33 $"New Zealand" off \
|
||||||
34 "Norway" off \
|
34 $"Norway" off \
|
||||||
35 "Poland" off \
|
35 $"Poland" off \
|
||||||
36 "Portugal" off \
|
36 $"Portugal" off \
|
||||||
37 "Romania" off \
|
37 $"Romania" off \
|
||||||
38 "Russia" off \
|
38 $"Russia" off \
|
||||||
39 "Slovakia" off \
|
39 $"Slovakia" off \
|
||||||
40 "Slovenia" off \
|
40 $"Slovenia" off \
|
||||||
41 "Spain" off \
|
41 $"Spain" off \
|
||||||
42 "Sweden" off \
|
42 $"Sweden" off \
|
||||||
43 "Switzerland" off \
|
43 $"Switzerland" off \
|
||||||
44 "Taiwan" off \
|
44 $"Taiwan" off \
|
||||||
45 "Thailand" off \
|
45 $"Thailand" off \
|
||||||
46 "Turkey" off \
|
46 $"Turkey" off \
|
||||||
47 "Ukraine" off \
|
47 $"Ukraine" off \
|
||||||
48 "United Kingdom" off \
|
48 $"United Kingdom" off \
|
||||||
49 "United States" on 2> $data
|
49 $"United States" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -869,24 +869,24 @@ function interactive_configuration {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--radiolist "Pick a domain name service (DNS):" 25 50 16 \
|
--radiolist $"Pick a domain name service (DNS):" 25 50 16 \
|
||||||
1 "Digital Courage" on \
|
1 $"Digital Courage" on \
|
||||||
2 "German Privacy Foundation 1" off \
|
2 $"German Privacy Foundation 1" off \
|
||||||
3 "German Privacy Foundation 2" off \
|
3 $"German Privacy Foundation 2" off \
|
||||||
4 "Chaos Computer Club" off \
|
4 $"Chaos Computer Club" off \
|
||||||
5 "ClaraNet" off \
|
5 $"ClaraNet" off \
|
||||||
6 "OpenNIC 1" off \
|
6 $"OpenNIC 1" off \
|
||||||
7 "OpenNIC 2" off \
|
7 $"OpenNIC 2" off \
|
||||||
8 "OpenNIC 3" off \
|
8 $"OpenNIC 3" off \
|
||||||
9 "OpenNIC 4" off \
|
9 $"OpenNIC 4" off \
|
||||||
10 "OpenNIC 5" off \
|
10 $"OpenNIC 5" off \
|
||||||
11 "OpenNIC 6" off \
|
11 $"OpenNIC 6" off \
|
||||||
12 "OpenNIC 7" off \
|
12 $"OpenNIC 7" off \
|
||||||
13 "PowerNS" off \
|
13 $"PowerNS" off \
|
||||||
14 "ValiDOM" off \
|
14 $"ValiDOM" off \
|
||||||
15 "Freie Unzensierte" off \
|
15 $"Freie Unzensierte" off \
|
||||||
16 "Google" off 2> $data
|
16 $"Google" off 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -949,8 +949,8 @@ function interactive_configuration {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--radiolist "Choose Dynamic DNS provider:" 15 40 14 \
|
--radiolist $"Choose Dynamic DNS provider:" 15 40 14 \
|
||||||
1 dyndns off \
|
1 dyndns off \
|
||||||
2 freedns on \
|
2 freedns on \
|
||||||
3 zoneedit off \
|
3 zoneedit off \
|
||||||
|
@ -993,8 +993,8 @@ function interactive_configuration {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--inputbox "Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
--inputbox $"Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) DDNS_USERNAME=$(cat $data);;
|
0) DDNS_USERNAME=$(cat $data);;
|
||||||
|
@ -1008,10 +1008,10 @@ function interactive_configuration {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--clear \
|
--clear \
|
||||||
--insecure \
|
--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=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) DDNS_PASSWORD=$(cat $data);;
|
0) DDNS_PASSWORD=$(cat $data);;
|
||||||
|
@ -1019,7 +1019,7 @@ function interactive_configuration {
|
||||||
255) exit 1;;
|
255) exit 1;;
|
||||||
esac
|
esac
|
||||||
if [ ${#DDNS_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
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=""
|
DDNS_PASSWORD=""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -1031,8 +1031,8 @@ function interactive_configuration {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--inputbox "Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
--inputbox $"Your full name (or nick)" 10 30 "$(grep 'MY_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) MY_NAME=$(cat $data);;
|
0) MY_NAME=$(cat $data);;
|
||||||
|
@ -1057,11 +1057,11 @@ function interactive_configuration {
|
||||||
fi
|
fi
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Local Network Configuration" \
|
--title $"Local Network Configuration" \
|
||||||
--form "\nPlease enter the IP addresses:" 11 55 3 \
|
--form $"\nPlease enter the IP addresses:" 11 55 3 \
|
||||||
"This system:" 1 1 "$LOCAL_NETWORK_STATIC_IP_ADDRESS" 1 16 16 15 \
|
$"This system:" 1 1 "$LOCAL_NETWORK_STATIC_IP_ADDRESS" 1 16 16 15 \
|
||||||
"Internet router:" 2 1 "$ROUTER_IP_ADDRESS" 2 16 16 15 \
|
$"Internet router:" 2 1 "$ROUTER_IP_ADDRESS" 2 16 16 15 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -1080,19 +1080,19 @@ function interactive_configuration {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
|
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Wiki Configuration" \
|
--title $"Wiki Configuration" \
|
||||||
--form "\nPlease enter your wiki details:" 11 55 4 \
|
--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 \
|
$"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 \
|
$"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 \
|
$"Code:" 3 1 "$(grep 'WIKI_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 40 \
|
||||||
2> $data
|
2> $data
|
||||||
else
|
else
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Wiki Configuration" \
|
--title $"Wiki Configuration" \
|
||||||
--form "\nPlease enter your wiki details:" 11 55 3 \
|
--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 \
|
$"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 \
|
$"Domain:" 2 1 "$(grep 'WIKI_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
|
||||||
2> $data
|
2> $data
|
||||||
fi
|
fi
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -1107,13 +1107,13 @@ function interactive_configuration {
|
||||||
validate_domain_name
|
validate_domain_name
|
||||||
if [[ $TEST_DOMAIN_NAME != $WIKI_DOMAIN_NAME ]]; then
|
if [[ $TEST_DOMAIN_NAME != $WIKI_DOMAIN_NAME ]]; then
|
||||||
WIKI_DOMAIN_NAME=
|
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
|
else
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
WIKI_CODE=$(cat $data | sed -n 3p)
|
WIKI_CODE=$(cat $data | sed -n 3p)
|
||||||
if [ ${#WIKI_CODE} -lt 30 ]; then
|
if [ ${#WIKI_CODE} -lt 30 ]; then
|
||||||
WIKI_DOMAIN_NAME=
|
WIKI_DOMAIN_NAME=
|
||||||
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1132,19 +1132,19 @@ function interactive_configuration {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Blog Configuration" \
|
--title $"Blog Configuration" \
|
||||||
--form "\nPlease enter your blog details:" 11 55 4 \
|
--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 \
|
$"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 \
|
$"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 \
|
$"Code:" 3 1 "$(grep 'FULLBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 3 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
else
|
else
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Blog Configuration" \
|
--title $"Blog Configuration" \
|
||||||
--form "\nPlease enter your blog details:" 11 55 3 \
|
--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 \
|
$"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 \
|
$"Domain:" 2 1 "$(grep 'FULLBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
fi
|
fi
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -1162,13 +1162,13 @@ function interactive_configuration {
|
||||||
validate_domain_name
|
validate_domain_name
|
||||||
if [[ $TEST_DOMAIN_NAME != $FULLBLOG_DOMAIN_NAME ]]; then
|
if [[ $TEST_DOMAIN_NAME != $FULLBLOG_DOMAIN_NAME ]]; then
|
||||||
FULLBLOG_DOMAIN_NAME=
|
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
|
else
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
FULLBLOG_CODE=$(cat $data | sed -n 3p)
|
FULLBLOG_CODE=$(cat $data | sed -n 3p)
|
||||||
if [ ${#FULLBLOG_CODE} -lt 30 ]; then
|
if [ ${#FULLBLOG_CODE} -lt 30 ]; then
|
||||||
FULLBLOG_DOMAIN_NAME=
|
FULLBLOG_DOMAIN_NAME=
|
||||||
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1187,17 +1187,17 @@ function interactive_configuration {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Owncloud Configuration" \
|
--title $"Owncloud Configuration" \
|
||||||
--form "\nPlease enter your Owncloud details:" 11 55 3 \
|
--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 \
|
$"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 \
|
$"Code:" 2 1 "$(grep 'OWNCLOUD_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
else
|
else
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Owncloud Configuration" \
|
--title $"Owncloud Configuration" \
|
||||||
--form "\nPlease enter your Owncloud details:" 11 55 3 \
|
--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 \
|
$"Domain:" 1 1 "$(grep 'OWNCLOUD_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
fi
|
fi
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -1211,13 +1211,13 @@ function interactive_configuration {
|
||||||
validate_domain_name
|
validate_domain_name
|
||||||
if [[ $TEST_DOMAIN_NAME != $OWNCLOUD_DOMAIN_NAME ]]; then
|
if [[ $TEST_DOMAIN_NAME != $OWNCLOUD_DOMAIN_NAME ]]; then
|
||||||
OWNCLOUD_DOMAIN_NAME=
|
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
|
else
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
OWNCLOUD_CODE=$(cat $data | sed -n 2p)
|
OWNCLOUD_CODE=$(cat $data | sed -n 2p)
|
||||||
if [ ${#OWNCLOUD_CODE} -lt 30 ]; then
|
if [ ${#OWNCLOUD_CODE} -lt 30 ]; then
|
||||||
OWNCLOUD_DOMAIN_NAME=
|
OWNCLOUD_DOMAIN_NAME=
|
||||||
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1236,17 +1236,17 @@ function interactive_configuration {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Hubzilla Configuration" \
|
--title $"Hubzilla Configuration" \
|
||||||
--form "\nPlease enter your Hubzilla details:" 11 55 3 \
|
--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 \
|
$"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 \
|
$"Code:" 2 1 "$(grep 'HUBZILLA_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
else
|
else
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Hubzilla Configuration" \
|
--title $"Hubzilla Configuration" \
|
||||||
--form "\nPlease enter your Hubzilla details:" 11 55 3 \
|
--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 \
|
$"Domain:" 1 1 "$(grep 'HUBZILLA_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
fi
|
fi
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -1260,13 +1260,13 @@ function interactive_configuration {
|
||||||
validate_domain_name
|
validate_domain_name
|
||||||
if [[ $TEST_DOMAIN_NAME != $HUBZILLA_DOMAIN_NAME ]]; then
|
if [[ $TEST_DOMAIN_NAME != $HUBZILLA_DOMAIN_NAME ]]; then
|
||||||
HUBZILLA_DOMAIN_NAME=
|
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
|
else
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
HUBZILLA_CODE=$(cat $data | sed -n 2p)
|
HUBZILLA_CODE=$(cat $data | sed -n 2p)
|
||||||
if [ ${#HUBZILLA_CODE} -lt 30 ]; then
|
if [ ${#HUBZILLA_CODE} -lt 30 ]; then
|
||||||
HUBZILLA_DOMAIN_NAME=
|
HUBZILLA_DOMAIN_NAME=
|
||||||
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1285,17 +1285,17 @@ function interactive_configuration {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Microblog Configuration" \
|
--title $"Microblog Configuration" \
|
||||||
--form "\nPlease enter your Microblog details:" 11 55 3 \
|
--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 \
|
$"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 \
|
$"Code:" 2 1 "$(grep 'MICROBLOG_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
else
|
else
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Microblog Configuration" \
|
--title $"Microblog Configuration" \
|
||||||
--form "\nPlease enter your Microblog details:" 11 55 3 \
|
--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 \
|
$"Domain:" 1 1 "$(grep 'MICROBLOG_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
fi
|
fi
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -1312,13 +1312,13 @@ function interactive_configuration {
|
||||||
validate_domain_name
|
validate_domain_name
|
||||||
if [[ $TEST_DOMAIN_NAME != $MICROBLOG_DOMAIN_NAME ]]; then
|
if [[ $TEST_DOMAIN_NAME != $MICROBLOG_DOMAIN_NAME ]]; then
|
||||||
MICROBLOG_DOMAIN_NAME=
|
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
|
else
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
MICROBLOG_CODE=$(cat $data | sed -n 2p)
|
MICROBLOG_CODE=$(cat $data | sed -n 2p)
|
||||||
if [ ${#MICROBLOG_CODE} -lt 30 ]; then
|
if [ ${#MICROBLOG_CODE} -lt 30 ]; then
|
||||||
MICROBLOG_DOMAIN_NAME=
|
MICROBLOG_DOMAIN_NAME=
|
||||||
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1338,17 +1338,17 @@ function interactive_configuration {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
|
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Developer 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 \
|
--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 \
|
$"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 \
|
$"Code:" 2 1 "$(grep 'GIT_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 40 \
|
||||||
2> $data
|
2> $data
|
||||||
else
|
else
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Developer 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 \
|
--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 \
|
$"Domain:" 1 1 "$(grep 'GIT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 16 25 40 \
|
||||||
2> $data
|
2> $data
|
||||||
fi
|
fi
|
||||||
sel=$?
|
sel=$?
|
||||||
|
@ -1362,13 +1362,13 @@ function interactive_configuration {
|
||||||
validate_domain_name
|
validate_domain_name
|
||||||
if [[ $TEST_DOMAIN_NAME != $GIT_DOMAIN_NAME ]]; then
|
if [[ $TEST_DOMAIN_NAME != $GIT_DOMAIN_NAME ]]; then
|
||||||
GIT_DOMAIN_NAME=
|
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
|
else
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
GIT_CODE=$(cat $data | sed -n 2p)
|
GIT_CODE=$(cat $data | sed -n 2p)
|
||||||
if [ ${#GIT_CODE} -lt 30 ]; then
|
if [ ${#GIT_CODE} -lt 30 ]; then
|
||||||
GIT_DOMAIN_NAME=
|
GIT_DOMAIN_NAME=
|
||||||
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1389,11 +1389,11 @@ function interactive_configuration {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--title "Default Domain" \
|
--title $"Default Domain" \
|
||||||
--form "\nWhich domain name should your email/XMPP/IRC/VoIP be associated with?" 11 55 3 \
|
--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 \
|
$"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 \
|
$"Code:" 2 1 "$(grep 'DEFAULT_DOMAIN_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 16 25 30 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -1405,12 +1405,12 @@ function interactive_configuration {
|
||||||
if [ $DEFAULT_DOMAIN_NAME ]; then
|
if [ $DEFAULT_DOMAIN_NAME ]; then
|
||||||
if [ ${#DEFAULT_DOMAIN_CODE} -lt 30 ]; then
|
if [ ${#DEFAULT_DOMAIN_CODE} -lt 30 ]; then
|
||||||
DEFAULT_DOMAIN_NAME=
|
DEFAULT_DOMAIN_NAME=
|
||||||
dialog --title "FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
dialog --title $"FreeDNS code" --msgbox "$FREEDNS_MESSAGE" 15 50
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--inputbox "Which domain name should your email/XMPP/IRC/VoIP be associated with?" 10 45 \
|
--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
|
"$(grep 'DEFAULT_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -1424,7 +1424,7 @@ function interactive_configuration {
|
||||||
validate_domain_name
|
validate_domain_name
|
||||||
if [[ $TEST_DOMAIN_NAME != $DEFAULT_DOMAIN_NAME ]]; then
|
if [[ $TEST_DOMAIN_NAME != $DEFAULT_DOMAIN_NAME ]]; then
|
||||||
DEFAULT_DOMAIN_NAME=
|
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
|
else
|
||||||
DEFAULT_DOMAIN_DETAILS_COMPLETE="yes"
|
DEFAULT_DOMAIN_DETAILS_COMPLETE="yes"
|
||||||
fi
|
fi
|
||||||
|
@ -1444,8 +1444,8 @@ function interactive_configuration {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Configuration" \
|
dialog --backtitle $"Freedombone Configuration" \
|
||||||
--inputbox "Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
|
--inputbox $"Your email address" 10 30 "$EMAIL_ADDRESS" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) MY_EMAIL_ADDRESS=$(cat $data);;
|
0) MY_EMAIL_ADDRESS=$(cat $data);;
|
||||||
|
@ -1465,9 +1465,10 @@ function interactive_configuration {
|
||||||
function show_result {
|
function show_result {
|
||||||
clear
|
clear
|
||||||
echo ''
|
echo ''
|
||||||
echo "Configuration filename: $CONFIGURATION_FILE"
|
echo -n $"Configuration filename:"
|
||||||
|
echo " $CONFIGURATION_FILE"
|
||||||
echo ''
|
echo ''
|
||||||
echo 'Contents:'
|
echo $'Contents:'
|
||||||
echo ''
|
echo ''
|
||||||
cat $CONFIGURATION_FILE
|
cat $CONFIGURATION_FILE
|
||||||
echo ''
|
echo ''
|
||||||
|
|
|
@ -37,7 +37,7 @@ COMPLETION_FILE=$HOME/freedombone-completed.txt
|
||||||
SELECTED_USERNAME=
|
SELECTED_USERNAME=
|
||||||
SIP_CONFIG_FILE=/etc/sipwitch.conf
|
SIP_CONFIG_FILE=/etc/sipwitch.conf
|
||||||
ADMIN_USER=
|
ADMIN_USER=
|
||||||
UPGRADE_SCRIPT_NAME="freedombone-upgrade"
|
UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade"
|
||||||
|
|
||||||
function any_key {
|
function any_key {
|
||||||
echo ' '
|
echo ' '
|
||||||
|
@ -46,8 +46,8 @@ function any_key {
|
||||||
|
|
||||||
function check_for_updates {
|
function check_for_updates {
|
||||||
if [ ! -f /etc/cron.weekly/$UPGRADE_SCRIPT_NAME ]; then
|
if [ ! -f /etc/cron.weekly/$UPGRADE_SCRIPT_NAME ]; then
|
||||||
dialog --title "Check for updates" \
|
dialog --title $"Check for updates" \
|
||||||
--msgbox "Upgrade script was not found" 6 40
|
--msgbox $"Upgrade script was not found" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -59,11 +59,11 @@ function check_for_updates {
|
||||||
function add_user {
|
function add_user {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Add new user" \
|
--title $"Add new user" \
|
||||||
--form "\n" 8 40 3 \
|
--form "\n" 8 40 3 \
|
||||||
"Username:" 1 1 "" 1 11 16 15 \
|
$"Username:" 1 1 "" 1 11 16 15 \
|
||||||
"ssh public key (optional):" 2 1 "" 3 1 40 10000 \
|
$"ssh public key (optional):" 2 1 "" 3 1 40 10000 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -73,13 +73,13 @@ function add_user {
|
||||||
new_user_username=$(cat $data | sed -n 1p)
|
new_user_username=$(cat $data | sed -n 1p)
|
||||||
new_user_ssh_public_key=$(cat $data | sed -n 2p)
|
new_user_ssh_public_key=$(cat $data | sed -n 2p)
|
||||||
if [ ${#new_user_username} -lt 2 ]; then
|
if [ ${#new_user_username} -lt 2 ]; then
|
||||||
dialog --title "New username" \
|
dialog --title $"New username" \
|
||||||
--msgbox "No username was given" 6 40
|
--msgbox $"No username was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ "$new_user_username" == *" "* ]]; then
|
if [[ "$new_user_username" == *" "* ]]; then
|
||||||
dialog --title "Invalid username" \
|
dialog --title $"Invalid username" \
|
||||||
--msgbox "The username should not contain any spaces" 6 40
|
--msgbox $"The username should not contain any spaces" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ ${#new_user_ssh_public_key} -lt 20 ]; then
|
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"
|
freedombone-adduser "$new_user_username" "$new_user_ssh_public_key"
|
||||||
any_key
|
any_key
|
||||||
else
|
else
|
||||||
dialog --title "ssh public key" \
|
dialog --title $"ssh public key" \
|
||||||
--msgbox "This does not look like an ssh public key" 6 40
|
--msgbox $"This does not look like an ssh public key" 6 40
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ function show_sip_extensions {
|
||||||
return;
|
return;
|
||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
echo "SIP phone extensions:"
|
echo $"SIP phone extensions:"
|
||||||
echo " "
|
echo " "
|
||||||
while read ext; do
|
while read ext; do
|
||||||
if [[ $ext == *"user id"* ]]; then
|
if [[ $ext == *"user id"* ]]; then
|
||||||
|
@ -123,7 +123,7 @@ function select_user {
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --title "Select a user" \
|
dialog --title "Select a user" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--dselect "/home/" 14 40 2> $data
|
--dselect "/home/" 14 40 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -135,8 +135,8 @@ function select_user {
|
||||||
SELECTED_USERNAME=
|
SELECTED_USERNAME=
|
||||||
fi
|
fi
|
||||||
if [ ! -d /home/$SELECTED_USERNAME/Maildir ]; then
|
if [ ! -d /home/$SELECTED_USERNAME/Maildir ]; then
|
||||||
dialog --title "User directory check" \
|
dialog --title $"User directory check" \
|
||||||
--msgbox "This does not look like a user directory" 6 40
|
--msgbox $"This does not look like a user directory" 6 40
|
||||||
SELECTED_USERNAME=
|
SELECTED_USERNAME=
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,8 @@ function delete_user {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
|
if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
|
||||||
dialog --title "Administrator user" \
|
dialog --title $"Administrator user" \
|
||||||
--msgbox "You can't delete the administrator user" 6 40
|
--msgbox $"You can't delete the administrator user" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
|
@ -158,18 +158,18 @@ function delete_user {
|
||||||
|
|
||||||
function configure_remote_backups {
|
function configure_remote_backups {
|
||||||
if ! grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
|
if ! grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
|
||||||
dialog --title "Administrator user" \
|
dialog --title $"Administrator user" \
|
||||||
--msgbox "No Administrator user found. Check $COMPLETION_FILE" 6 40
|
--msgbox $"No Administrator user found. Check $COMPLETION_FILE" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ ${#ADMIN} -lt 2 ]; then
|
if [ ${#ADMIN} -lt 2 ]; then
|
||||||
dialog --title "Administrator user" \
|
dialog --title $"Administrator user" \
|
||||||
--msgbox "Username not found" 6 40
|
--msgbox $"Username not found" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ ! -d /home/$ADMIN_USER ]; then
|
if [ ! -d /home/$ADMIN_USER ]; then
|
||||||
dialog --title "Administrator user" \
|
dialog --title $"Administrator user" \
|
||||||
--msgbox "Home directory not found" 6 40
|
--msgbox $"Home directory not found" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
freedombone-remote -u $ADMIN_USER
|
freedombone-remote -u $ADMIN_USER
|
||||||
|
@ -181,7 +181,8 @@ function change_password {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
echo "Change password for $SELECTED_USERNAME"
|
echo -n $"Change password for"
|
||||||
|
echo " $SELECTED_USERNAME"
|
||||||
echo ""
|
echo ""
|
||||||
su -c "passwd" - $SELECTED_USERNAME
|
su -c "passwd" - $SELECTED_USERNAME
|
||||||
any_key
|
any_key
|
||||||
|
@ -194,10 +195,10 @@ function change_ssh_public_key {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
|
if grep -Fxq "Admin user:$SELECTED_USERNAME" $COMPLETION_FILE; then
|
||||||
dialog --title "Change ssh public key" \
|
dialog --title $"Change ssh public key" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--defaultno \
|
--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=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
|
@ -207,9 +208,9 @@ function change_ssh_public_key {
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --title "Change ssh public key for $SELECTED_USERNAME" \
|
dialog --title $"Change ssh public key for $SELECTED_USERNAME" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--inputbox "Paste the ssh public key below" 8 60 2>$data
|
--inputbox $"Paste the ssh public key below" 8 60 2>$data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0)
|
0)
|
||||||
|
@ -224,8 +225,8 @@ function change_ssh_public_key {
|
||||||
/home/$SELECTED_USERNAME/.ssh/authorized_keys
|
/home/$SELECTED_USERNAME/.ssh/authorized_keys
|
||||||
chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
|
chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
|
||||||
/home/$SELECTED_USERNAME/.ssh
|
/home/$SELECTED_USERNAME/.ssh
|
||||||
dialog --title "Change ssh public key" \
|
dialog --title $"Change ssh public key" \
|
||||||
--msgbox "ssh public key was installed" 6 40
|
--msgbox $"ssh public key was installed" 6 40
|
||||||
else
|
else
|
||||||
if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then
|
if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then
|
||||||
if [ ! -d /home/$SELECTED_USERNAME/.ssh ]; then
|
if [ ! -d /home/$SELECTED_USERNAME/.ssh ]; then
|
||||||
|
@ -235,8 +236,8 @@ function change_ssh_public_key {
|
||||||
/home/$SELECTED_USERNAME/.ssh/authorized_keys
|
/home/$SELECTED_USERNAME/.ssh/authorized_keys
|
||||||
chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
|
chown -R $SELECTED_USERNAME:$SELECTED_USERNAME \
|
||||||
/home/$SELECTED_USERNAME/.ssh
|
/home/$SELECTED_USERNAME/.ssh
|
||||||
dialog --title "Change ssh public key" \
|
dialog --title $"Change ssh public key" \
|
||||||
--msgbox "ssh public key was installed" 6 40
|
--msgbox $"ssh public key was installed" 6 40
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -252,12 +253,12 @@ function add_to_mailing_list {
|
||||||
fi
|
fi
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Subscribe $SELECTED_USERNAME to a mailing list" \
|
--title $"Subscribe $SELECTED_USERNAME to a mailing list" \
|
||||||
--form "\n" 8 68 4 \
|
--form "\n" 8 68 4 \
|
||||||
"List folder name:" 1 1 "" 1 35 26 25 \
|
$"List folder name:" 1 1 "" 1 35 26 25 \
|
||||||
"Name between [] on subject line:" 2 1 "" 2 35 26 25 \
|
$"Name between [] on subject line:" 2 1 "" 2 35 26 25 \
|
||||||
"List email address:" 3 1 "" 3 35 26 25 \
|
$"List email address:" 3 1 "" 3 35 26 25 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -269,30 +270,30 @@ function add_to_mailing_list {
|
||||||
LIST_EMAIL=$(cat $data | sed -n 3p)
|
LIST_EMAIL=$(cat $data | sed -n 3p)
|
||||||
|
|
||||||
if [ ${#LIST_NAME} -lt 2 ]; then
|
if [ ${#LIST_NAME} -lt 2 ]; then
|
||||||
dialog --title "Add mailing list" \
|
dialog --title $"Add mailing list" \
|
||||||
--msgbox "No mailing list name was given" 6 40
|
--msgbox $"No mailing list name was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ ${#LIST_SUBJECT} -lt 2 ]; then
|
if [ ${#LIST_SUBJECT} -lt 2 ]; then
|
||||||
dialog --title "Add mailing list" \
|
dialog --title $"Add mailing list" \
|
||||||
--msgbox "No mailing list subject was given" 6 40
|
--msgbox $"No mailing list subject was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ ${#LIST_EMAIL} -lt 2 ]; then
|
if [ ${#LIST_EMAIL} -lt 2 ]; then
|
||||||
dialog --title "Add mailing list" \
|
dialog --title $"Add mailing list" \
|
||||||
--msgbox "No mailing list email address was given" 6 40
|
--msgbox $"No mailing list email address was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
|
if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
|
||||||
dialog --title "Add mailing list" \
|
dialog --title $"Add mailing list" \
|
||||||
--msgbox "Unrecognised email address" 6 40
|
--msgbox $"Unrecognised email address" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
freedombone-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
|
freedombone-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
|
||||||
-s "$LIST_SUBJECT" -e "$LIST_EMAIL"
|
-s "$LIST_SUBJECT" -e "$LIST_EMAIL"
|
||||||
dialog --title "Add mailing list" \
|
dialog --title $"Add mailing list" \
|
||||||
--msgbox "$LIST_NAME list was added" 6 40
|
--msgbox $"$LIST_NAME list was added" 6 40
|
||||||
}
|
}
|
||||||
|
|
||||||
function email_rule {
|
function email_rule {
|
||||||
|
@ -302,11 +303,11 @@ function email_rule {
|
||||||
fi
|
fi
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Email rule for user $SELECTED_USERNAME" \
|
--title $"Email rule for user $SELECTED_USERNAME" \
|
||||||
--form "\n" 8 65 3 \
|
--form "\n" 8 65 3 \
|
||||||
"When email arrives from address:" 1 1 "" 1 35 24 28 \
|
$"When email arrives from address:" 1 1 "" 1 35 24 28 \
|
||||||
"Move to folder:" 2 1 "" 2 35 24 28 \
|
$"Move to folder:" 2 1 "" 2 35 24 28 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -317,25 +318,25 @@ function email_rule {
|
||||||
RULE_FOLDER=$(cat $data | sed -n 2p)
|
RULE_FOLDER=$(cat $data | sed -n 2p)
|
||||||
|
|
||||||
if [ ${#RULE_EMAIL} -lt 2 ]; then
|
if [ ${#RULE_EMAIL} -lt 2 ]; then
|
||||||
dialog --title "Add email rule" \
|
dialog --title $"Add email rule" \
|
||||||
--msgbox "No email address was given" 6 40
|
--msgbox $"No email address was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ ${#RULE_FOLDER} -lt 2 ]; then
|
if [ ${#RULE_FOLDER} -lt 2 ]; then
|
||||||
dialog --title "Add email rule" \
|
dialog --title $"Add email rule" \
|
||||||
--msgbox "No folder name was given" 6 40
|
--msgbox $"No folder name was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
|
if [[ "$RULE_EMAIL" != *"@"* || "$RULE_EMAIL" != *"."* ]]; then
|
||||||
dialog --title "Add email rule" \
|
dialog --title $"Add email rule" \
|
||||||
--msgbox "Unrecognised email address" 6 40
|
--msgbox $"Unrecognised email address" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
freedombone-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
|
freedombone-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
|
||||||
-g "$RULE_FOLDER"
|
-g "$RULE_FOLDER"
|
||||||
dialog --title "Add email rule" \
|
dialog --title $"Add email rule" \
|
||||||
--msgbox "Email rule for $RULE_EMAIL was added" 6 40
|
--msgbox $"Email rule for $RULE_EMAIL was added" 6 40
|
||||||
}
|
}
|
||||||
|
|
||||||
function block_unblock_email {
|
function block_unblock_email {
|
||||||
|
@ -343,13 +344,14 @@ function block_unblock_email {
|
||||||
if [ ! $SELECTED_USERNAME ]; then
|
if [ ! $SELECTED_USERNAME ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
blockstr=$"Block/Unblock email going to"
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Block/Unblock email going to $SELECTED_USERNAME" \
|
--title "$blockstr $SELECTED_USERNAME" \
|
||||||
--form "\n" 8 65 3 \
|
--form "\n" 8 65 3 \
|
||||||
"When email arrives from address:" 1 1 "" 1 35 24 28 \
|
$"When email arrives from address:" 1 1 "" 1 35 24 28 \
|
||||||
"Block it:" 2 1 "yes" 2 35 4 4 \
|
$"Block it:" 2 1 "yes" 2 35 4 4 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -359,22 +361,22 @@ function block_unblock_email {
|
||||||
BLOCK_EMAIL=$(cat $data | sed -n 1p)
|
BLOCK_EMAIL=$(cat $data | sed -n 1p)
|
||||||
BLOCK=$(cat $data | sed -n 2p)
|
BLOCK=$(cat $data | sed -n 2p)
|
||||||
if [ ${#BLOCK_EMAIL} -lt 2 ]; then
|
if [ ${#BLOCK_EMAIL} -lt 2 ]; then
|
||||||
dialog --title "Block/Unblock an email" \
|
dialog --title $"Block/Unblock an email" \
|
||||||
--msgbox "No email address was given" 6 40
|
--msgbox $"No email address was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
|
if [[ "$BLOCK_EMAIL" != *"@"* || "$BLOCK_EMAIL" != *"."* ]]; then
|
||||||
dialog --title "Block/Unblock an email" \
|
dialog --title $"Block/Unblock an email" \
|
||||||
--msgbox "Unrecognised email address" 6 40
|
--msgbox $"Unrecognised email address" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
|
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
|
||||||
freedombone-ignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
|
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
|
--msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME blocked" 6 40
|
||||||
else
|
else
|
||||||
freedombone-unignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
|
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
|
--msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 40
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -384,13 +386,14 @@ function block_unblock_subject {
|
||||||
if [ ! $SELECTED_USERNAME ]; then
|
if [ ! $SELECTED_USERNAME ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
blockstr=$"Block/Unblock email going to"
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Block/Unblock email going to $SELECTED_USERNAME" \
|
--title "$blockstr $SELECTED_USERNAME" \
|
||||||
--form "\n" 8 70 3 \
|
--form "\n" 8 70 3 \
|
||||||
"When email arrives with subject text:" 1 1 "" 1 40 24 28 \
|
$"When email arrives with subject text:" 1 1 "" 1 40 24 28 \
|
||||||
"Block it:" 2 1 "yes" 2 40 4 4 \
|
$"Block it:" 2 1 "yes" 2 40 4 4 \
|
||||||
2> $data
|
2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
|
@ -400,17 +403,17 @@ function block_unblock_subject {
|
||||||
BLOCK_SUBJECT=$(cat $data | sed -n 1p)
|
BLOCK_SUBJECT=$(cat $data | sed -n 1p)
|
||||||
BLOCK=$(cat $data | sed -n 2p)
|
BLOCK=$(cat $data | sed -n 2p)
|
||||||
if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
|
if [ ${#BLOCK_SUBJECT} -lt 2 ]; then
|
||||||
dialog --title "Block/Unblock an email" \
|
dialog --title $"Block/Unblock an email" \
|
||||||
--msgbox "No subject was given" 6 40
|
--msgbox $"No subject was given" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
|
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
|
||||||
freedombone-ignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
|
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
|
--msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME blocked" 6 40
|
||||||
else
|
else
|
||||||
freedombone-unignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
|
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
|
--msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -420,8 +423,8 @@ function create_keydrive_master {
|
||||||
if [ ! $SELECTED_USERNAME ]; then
|
if [ ! $SELECTED_USERNAME ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
dialog --title "USB Master Keydrive" \
|
dialog --title $"USB Master Keydrive" \
|
||||||
--msgbox "Plug in a LUKS encrypted USB drive" 6 40
|
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
|
||||||
clear
|
clear
|
||||||
freedombone-keydrive -u $SELECTED_USERNAME --master 'yes'
|
freedombone-keydrive -u $SELECTED_USERNAME --master 'yes'
|
||||||
any_key
|
any_key
|
||||||
|
@ -432,44 +435,44 @@ function create_keydrive_fragment {
|
||||||
if [ ! $SELECTED_USERNAME ]; then
|
if [ ! $SELECTED_USERNAME ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
dialog --title "USB Fragment Keydrive" \
|
dialog --title $"USB Fragment Keydrive" \
|
||||||
--msgbox "Plug in a LUKS encrypted USB drive" 6 40
|
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
|
||||||
clear
|
clear
|
||||||
freedombone-keydrive -u $SELECTED_USERNAME
|
freedombone-keydrive -u $SELECTED_USERNAME
|
||||||
any_key
|
any_key
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup_data {
|
function backup_data {
|
||||||
dialog --title "Backup data to USB" \
|
dialog --title $"Backup data to USB" \
|
||||||
--msgbox "Plug in a LUKS encrypted USB drive" 6 40
|
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
|
||||||
clear
|
clear
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Enter the passphrase for your LUKS encrypted backup drive:'
|
echo $'Enter the passphrase for your LUKS encrypted backup drive:'
|
||||||
backup
|
backup
|
||||||
any_key
|
any_key
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_data {
|
function restore_data {
|
||||||
dialog --title "Restore data from USB" \
|
dialog --title $"Restore data from USB" \
|
||||||
--msgbox "Plug in your backup USB drive" 6 40
|
--msgbox $"Plug in your backup USB drive" 6 40
|
||||||
clear
|
clear
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Enter the passphrase for your LUKS encrypted backup drive:'
|
echo $'Enter the passphrase for your LUKS encrypted backup drive:'
|
||||||
restore
|
restore
|
||||||
any_key
|
any_key
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_data_remote {
|
function restore_data_remote {
|
||||||
if [ ! $ADMIN_USER ]; then
|
if [ ! $ADMIN_USER ]; then
|
||||||
dialog --title "Restore data from remote server" \
|
dialog --title $"Restore data from remote server" \
|
||||||
--msgbox "Unknown admin user" 6 40
|
--msgbox $"Unknown admin user" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --title "Restore from remote server" \
|
dialog --title $"Restore from remote server" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--inputbox "Enter the domain name of the server from which you wish to restore" 8 60 2>$data
|
--inputbox $"Enter the domain name of the server from which you wish to restore" 8 60 2>$data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0)
|
0)
|
||||||
|
@ -480,8 +483,8 @@ function restore_data_remote {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $friend_server_domain_name != *"."* ]]; then
|
if [[ $friend_server_domain_name != *"."* ]]; then
|
||||||
dialog --title "Remote server domain name" \
|
dialog --title $"Remote server domain name" \
|
||||||
--msgbox "Invalid domain name" 6 40
|
--msgbox $"Invalid domain name" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -493,9 +496,9 @@ function restore_data_remote {
|
||||||
|
|
||||||
function logging_on_off {
|
function logging_on_off {
|
||||||
logging="no"
|
logging="no"
|
||||||
dialog --title "Logging" \
|
dialog --title $"Logging" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--yesno "\nDo you want to turn logging on?" 7 60
|
--yesno $"\nDo you want to turn logging on?" 7 60
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) logging="yes";;
|
0) logging="yes";;
|
||||||
|
@ -504,7 +507,7 @@ function logging_on_off {
|
||||||
|
|
||||||
clear
|
clear
|
||||||
echo ''
|
echo ''
|
||||||
echo 'This may take a few seconds. Please wait...'
|
echo $'This may take a few seconds. Please wait...'
|
||||||
if [[ $logging == "no" ]]; then
|
if [[ $logging == "no" ]]; then
|
||||||
freedombone-logging off
|
freedombone-logging off
|
||||||
else
|
else
|
||||||
|
@ -517,8 +520,9 @@ function restore_gpg_key {
|
||||||
if [ ! $SELECTED_USERNAME ]; then
|
if [ ! $SELECTED_USERNAME ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
dialog --title "Restore GPG key for user $SELECTED_USERNAME" \
|
restorestr=$"Restore GPG key for user"
|
||||||
--msgbox "Plug in your USB keydrive" 6 40
|
dialog --title "$restorestr $SELECTED_USERNAME" \
|
||||||
|
--msgbox $"Plug in your USB keydrive" 6 40
|
||||||
clear
|
clear
|
||||||
freedombone-recoverkey -u $SELECTED_USERNAME
|
freedombone-recoverkey -u $SELECTED_USERNAME
|
||||||
any_key
|
any_key
|
||||||
|
@ -531,7 +535,7 @@ function security_settings {
|
||||||
|
|
||||||
function reset_tripwire {
|
function reset_tripwire {
|
||||||
clear
|
clear
|
||||||
echo 'Resetting the Tripwire...'
|
echo $'Resetting the Tripwire...'
|
||||||
echo ' '
|
echo ' '
|
||||||
echo '
|
echo '
|
||||||
|
|
||||||
|
@ -540,9 +544,9 @@ function reset_tripwire {
|
||||||
}
|
}
|
||||||
|
|
||||||
function hubzilla_renew_cert {
|
function hubzilla_renew_cert {
|
||||||
dialog --title "Renew SSL certificate" \
|
dialog --title $"Renew SSL certificate" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--yesno "\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
|
--yesno $"\nThis will renew a letsencrypt certificate. Select 'yes' to continue" 16 60
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
|
@ -550,51 +554,51 @@ function hubzilla_renew_cert {
|
||||||
esac
|
esac
|
||||||
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
|
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
|
||||||
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
|
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
|
||||||
dialog --title "Renew SSL certificate" \
|
dialog --title $"Renew SSL certificate" \
|
||||||
--msgbox "Hubzilla install directory not found" 6 40
|
--msgbox $"Hubzilla install directory not found" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
freedombone-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
|
freedombone-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
any_key
|
any_key
|
||||||
else
|
else
|
||||||
dialog --title "Renew SSL certificate" \
|
dialog --title $"Renew SSL certificate" \
|
||||||
--msgbox "Hubzilla certificate has been renewed" 6 40
|
--msgbox $"Hubzilla certificate has been renewed" 6 40
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function hubzilla_restore {
|
function hubzilla_restore {
|
||||||
dialog --title "Restore hubzilla from USB backup" \
|
dialog --title $"Restore hubzilla from USB backup" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--yesno "\nInsert your USB backup drive and select 'yes' to continue" 16 60
|
--yesno $"\nInsert your USB backup drive and select 'yes' to continue" 16 60
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
255) return;;
|
255) return;;
|
||||||
esac
|
esac
|
||||||
clear
|
clear
|
||||||
echo 'Enter your backup drive password:'
|
echo $'Enter your backup drive password:'
|
||||||
restorehubzilla
|
restorehubzilla
|
||||||
}
|
}
|
||||||
|
|
||||||
function hubzilla_channel_directory_server {
|
function hubzilla_channel_directory_server {
|
||||||
if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
|
if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
|
||||||
dialog --title "Hubzilla channel directory server" \
|
dialog --title $"Hubzilla channel directory server" \
|
||||||
--msgbox "Hubzilla is not installed on this system" 6 40
|
--msgbox $"Hubzilla is not installed on this system" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
|
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
|
||||||
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
|
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME/htdocs ]; then
|
||||||
dialog --title "Hubzilla channel directory server" \
|
dialog --title $"Hubzilla channel directory server" \
|
||||||
--msgbox "Hubzilla install directory not found" 6 40
|
--msgbox $"Hubzilla install directory not found" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --title "Hubzilla channel directory server" \
|
dialog --title $"Hubzilla channel directory server" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--inputbox "When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
|
--inputbox $"When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0)
|
0)
|
||||||
|
@ -603,13 +607,13 @@ function hubzilla_channel_directory_server {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ $hubzilla_domain_server != "https"* ]]; then
|
if [[ $hubzilla_domain_server != "https"* ]]; then
|
||||||
dialog --title "Hubzilla channel directory server" \
|
dialog --title $"Hubzilla channel directory server" \
|
||||||
--msgbox "Invalid domain - include the https://" 6 40
|
--msgbox $"Invalid domain - include the https://" 6 40
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
|
./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
|
||||||
dialog --title "Hubzilla channel directory server" \
|
dialog --title $"Hubzilla channel directory server" \
|
||||||
--msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40
|
--msgbox $"Domain channel directory server changed to $hubzilla_domain_server" 6 40
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -618,14 +622,14 @@ function format_drive {
|
||||||
drive=
|
drive=
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Format a USB drive (LUKS encrypted)" \
|
--title $"Format a USB drive (LUKS encrypted)" \
|
||||||
--radiolist "Choose a drive:" 12 70 5 \
|
--radiolist $"Choose a drive:" 12 70 5 \
|
||||||
1 "sda (Beaglebone Black)" off \
|
1 $"sda (Beaglebone Black)" off \
|
||||||
2 "sdb" off \
|
2 $"sdb" off \
|
||||||
3 "sdc" off \
|
3 $"sdc" off \
|
||||||
4 "sdd" off \
|
4 $"sdd" off \
|
||||||
5 "Back to Backup and Restore menu" on 2> $data
|
5 $"Back to Backup and Restore menu" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
|
@ -639,10 +643,10 @@ function format_drive {
|
||||||
5) return;;
|
5) return;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dialog --title "Format USB drive" \
|
dialog --title $"Format USB drive" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--defaultno \
|
--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=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
|
@ -655,10 +659,10 @@ function format_drive {
|
||||||
}
|
}
|
||||||
|
|
||||||
function shut_down_system {
|
function shut_down_system {
|
||||||
dialog --title "Power off the system" \
|
dialog --title $"Power off the system" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--defaultno \
|
--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=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
|
@ -668,10 +672,10 @@ function shut_down_system {
|
||||||
}
|
}
|
||||||
|
|
||||||
function restart_system {
|
function restart_system {
|
||||||
dialog --title "Restart the system" \
|
dialog --title $"Restart the system" \
|
||||||
--backtitle "Freedombone Control Panel" \
|
--backtitle $"Freedombone Control Panel" \
|
||||||
--defaultno \
|
--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=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
|
@ -685,19 +689,19 @@ function menu_backup_restore {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Backup and Restore" \
|
--title $"Backup and Restore" \
|
||||||
--radiolist "Choose an operation:" 17 70 10 \
|
--radiolist $"Choose an operation:" 17 70 10 \
|
||||||
1 "Backup data to USB drive" off \
|
1 $"Backup data to USB drive" off \
|
||||||
2 "Restore GPG key from USB keydrive" off \
|
2 $"Restore GPG key from USB keydrive" off \
|
||||||
3 "Restore data from USB drive" off \
|
3 $"Restore data from USB drive" off \
|
||||||
4 "Restore Hubzilla data from USB drive" off \
|
4 $"Restore Hubzilla data from USB drive" off \
|
||||||
5 "Configure remote backups" off \
|
5 $"Configure remote backups" off \
|
||||||
6 "Restore from remote backup" off \
|
6 $"Restore from remote backup" off \
|
||||||
7 "Backup GPG key to USB (master keydrive)" off \
|
7 $"Backup GPG key to USB (master keydrive)" off \
|
||||||
8 "Backup GPG key to USB (fragment keydrive)" off \
|
8 $"Backup GPG key to USB (fragment keydrive)" off \
|
||||||
9 "Format a USB drive (LUKS encrypted)" off \
|
9 $"Format a USB drive (LUKS encrypted)" off \
|
||||||
10 "Back to main menu" on 2> $data
|
10 $"Back to main menu" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) break;;
|
1) break;;
|
||||||
|
@ -723,14 +727,14 @@ function menu_email {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Email Filtering Rules" \
|
--title $"Email Filtering Rules" \
|
||||||
--radiolist "Choose an operation:" 12 70 5 \
|
--radiolist $"Choose an operation:" 12 70 5 \
|
||||||
1 "Add a user to a mailing list" off \
|
1 $"Add a user to a mailing list" off \
|
||||||
2 "Add an email rule" off \
|
2 $"Add an email rule" off \
|
||||||
3 "Block/Unblock an email address" off \
|
3 $"Block/Unblock an email address" off \
|
||||||
4 "Block/Unblock email with subject text" off \
|
4 $"Block/Unblock email with subject text" off \
|
||||||
5 "Back to main menu" on 2> $data
|
5 $"Back to main menu" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) break;;
|
1) break;;
|
||||||
|
@ -751,14 +755,14 @@ function menu_users {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Manage Users" \
|
--title $"Manage Users" \
|
||||||
--radiolist "Choose an operation:" 12 70 5 \
|
--radiolist $"Choose an operation:" 12 70 5 \
|
||||||
1 "Add a user" off \
|
1 $"Add a user" off \
|
||||||
2 "Delete a user" off \
|
2 $"Delete a user" off \
|
||||||
3 "Change user password" off \
|
3 $"Change user password" off \
|
||||||
4 "Change user ssh public key" off \
|
4 $"Change user ssh public key" off \
|
||||||
5 "Back to main menu" on 2> $data
|
5 $"Back to main menu" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) break;;
|
1) break;;
|
||||||
|
@ -779,13 +783,13 @@ function menu_hubzilla {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Hubzilla" \
|
--title $"Hubzilla" \
|
||||||
--radiolist "Choose an operation:" 13 70 4 \
|
--radiolist $"Choose an operation:" 13 70 4 \
|
||||||
1 "Restore from usb backup" off \
|
1 $"Restore from usb backup" off \
|
||||||
2 "Set channel directory server" off \
|
2 $"Set channel directory server" off \
|
||||||
3 "Renew SSL certificate" off \
|
3 $"Renew SSL certificate" off \
|
||||||
4 "Back to main menu" on 2> $data
|
4 $"Back to main menu" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) break;;
|
1) break;;
|
||||||
|
@ -805,21 +809,21 @@ function menu_top_level {
|
||||||
do
|
do
|
||||||
data=$(tempfile 2>/dev/null)
|
data=$(tempfile 2>/dev/null)
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title "Control Panel" \
|
--title $"Control Panel" \
|
||||||
--radiolist "Choose an operation:" 19 70 12 \
|
--radiolist $"Choose an operation:" 19 70 12 \
|
||||||
1 "Backup and Restore" off \
|
1 $"Backup and Restore" off \
|
||||||
2 "Show SIP Phone Extensions" off \
|
2 $"Show SIP Phone Extensions" off \
|
||||||
3 "Reset Tripwire" off \
|
3 $"Reset Tripwire" off \
|
||||||
4 "Logging on/off" off \
|
4 $"Logging on/off" off \
|
||||||
5 "Manage Users" off \
|
5 $"Manage Users" off \
|
||||||
6 "Email Filtering Rules" off \
|
6 $"Email Filtering Rules" off \
|
||||||
7 "Security Settings" off \
|
7 $"Security Settings" off \
|
||||||
8 "Hubzilla" off \
|
8 $"Hubzilla" off \
|
||||||
9 "Check for updates" off \
|
9 $"Check for updates" off \
|
||||||
10 "Power off the system" off \
|
10 $"Power off the system" off \
|
||||||
11 "Restart the system" off \
|
11 $"Restart the system" off \
|
||||||
12 "Exit" on 2> $data
|
12 $"Exit" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -843,7 +847,7 @@ function menu_top_level {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -f $COMPLETION_FILE ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue