Fix system type
This commit is contained in:
parent
73ec523bbb
commit
73dba7860a
|
@ -377,9 +377,16 @@ function show_help {
|
|||
exit 0
|
||||
}
|
||||
|
||||
function interactive_configuration_remote_backups {
|
||||
# TODO
|
||||
exit 0
|
||||
}
|
||||
|
||||
function interactive_configuration {
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--radiolist "Type of Installation:" 15 40 10 \
|
||||
--radiolist "Type of Installation:" 15 40 9 \
|
||||
1 Full on \
|
||||
2 Writer off \
|
||||
3 Cloud off \
|
||||
|
@ -388,10 +395,13 @@ function interactive_configuration {
|
|||
6 Non-Mailbox off \
|
||||
7 Social off \
|
||||
8 Media off \
|
||||
9 Tor-Dongle off
|
||||
9 Tor-Dongle off 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) ;;
|
||||
1) exit 0;;
|
||||
255) exit 0;;
|
||||
esac
|
||||
case $(cat $data) in
|
||||
2) SYSTEM_TYPE=$VARIANT_WRITER;;
|
||||
3) SYSTEM_TYPE=$VARIANT_CLOUD;;
|
||||
4) SYSTEM_TYPE=$VARIANT_CHAT;;
|
||||
|
@ -400,8 +410,23 @@ function interactive_configuration {
|
|||
7) SYSTEM_TYPE=$VARIANT_SOCIAL;;
|
||||
8) SYSTEM_TYPE=$VARIANT_MEDIA;;
|
||||
9) SYSTEM_TYPE=$VARIANT_TOR_DONGLE;;
|
||||
esac
|
||||
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --title "Select the user account to install as" \
|
||||
--backtitle "Freedombone Configuration" \
|
||||
--dselect /home/ 14 40 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0) MY_USERNAME=$(cat $data | awk -F '/' '{print $3}');;
|
||||
1) exit 0;;
|
||||
255) exit 0;;
|
||||
esac
|
||||
if [ ! $MY_USERNAME ]; then
|
||||
echo 'No user account was selected'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
dialog --title "Install Target" \
|
||||
--backtitle "Freedombone Configuration" \
|
||||
|
@ -493,18 +518,6 @@ function interactive_configuration {
|
|||
exit 3784
|
||||
fi
|
||||
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--inputbox "Your email address" 10 30 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0) MY_EMAIL_ADDRESS=$(cat $data);;
|
||||
1) exit 0;;
|
||||
255) exit 0;;
|
||||
esac
|
||||
if [ ! $MY_EMAIL_ADDRESS ]; then
|
||||
exit 8357
|
||||
fi
|
||||
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--inputbox "Static IP Address of this system" 10 30 2> $data
|
||||
sel=$?
|
||||
|
@ -746,7 +759,20 @@ function interactive_configuration {
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
clear
|
||||
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--inputbox "Your email address" 10 30 $MY_USERNAME@$DOMAIN_NAME> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0) MY_EMAIL_ADDRESS=$(cat $data);;
|
||||
1) exit 0;;
|
||||
255) exit 0;;
|
||||
esac
|
||||
if [ ! $MY_EMAIL_ADDRESS ]; then
|
||||
exit 8357
|
||||
fi
|
||||
|
||||
#clear
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue