Exiting from menus

This commit is contained in:
Bob Mottram 2015-11-01 10:56:33 +00:00
parent 00f2a60585
commit 8474a2dd74
1 changed files with 8 additions and 8 deletions

View File

@ -88,8 +88,8 @@ function select_user {
sel=$?
case $sel in
0) SELECTED_USERNAME=$(cat $data | awk -F '/' '{print $3}');;
1) exit 1;;
255) exit 1;;
1) return;;
255) return;;
esac
if [ ${#SELECTED_USERNAME} -lt 2 ]; then
SELECTED_USERNAME=
@ -441,8 +441,8 @@ function menu_backup_restore {
7 "Back to main menu" on 2> $data
sel=$?
case $sel in
1) exit 1;;
255) exit 1;;
1) break;;
255) break;;
esac
case $(cat $data) in
1) backup_data;;
@ -471,8 +471,8 @@ function menu_email {
5 "Back to main menu" on 2> $data
sel=$?
case $sel in
1) exit 1;;
255) exit 1;;
1) break;;
255) break;;
esac
case $(cat $data) in
1) add_to_mailing_list;;
@ -499,8 +499,8 @@ function menu_users {
5 "Back to main menu" on 2> $data
sel=$?
case $sel in
1) exit 1;;
255) exit 1;;
1) break;;
255) break;;
esac
case $(cat $data) in
1) add_user;;