icecast configuration menu style
This commit is contained in:
parent
caf8fa57e8
commit
55906ffcd6
|
@ -401,32 +401,28 @@ function icecast_set_maximum_streams {
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_interactive_icecast {
|
function configure_interactive_icecast {
|
||||||
|
W=(1 $"Import stream files from directory"
|
||||||
|
2 $"Import stream files from USB drive"
|
||||||
|
3 $"Format a USB drive for stream file storage"
|
||||||
|
4 $"Export stream files to USB drive"
|
||||||
|
5 $"Manually edit playlist"
|
||||||
|
6 $"Enable login for stream visitors"
|
||||||
|
7 $"Change password for stream visitors"
|
||||||
|
8 $"Re-scan playlist"
|
||||||
|
9 $"Restart stream"
|
||||||
|
10 $"Set Stream Name/Description/Genre"
|
||||||
|
11 $"Set maximum number of clients/streams")
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
data=$(mktemp 2>/dev/null)
|
# shellcheck disable=SC2068
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Icecast" --menu $"Choose an operation, or ESC to exit:" 20 60 11 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
--title $"Icecast" \
|
|
||||||
--radiolist $"Choose an operation:" 19 70 12 \
|
if [ ! "$selection" ]; then
|
||||||
1 $"Import stream files from directory" off \
|
break
|
||||||
2 $"Import stream files from USB drive" off \
|
fi
|
||||||
3 $"Format a USB drive for stream file storage" off \
|
|
||||||
4 $"Export stream files to USB drive" off \
|
case $selection in
|
||||||
5 $"Manually edit playlist" off \
|
|
||||||
6 $"Enable login for stream visitors" off \
|
|
||||||
7 $"Change password for stream visitors" off \
|
|
||||||
8 $"Re-scan playlist" off \
|
|
||||||
9 $"Restart stream" off \
|
|
||||||
10 $"Set Stream Name/Description/Genre" off \
|
|
||||||
11 $"Set maximum number of clients/streams" off \
|
|
||||||
12 $"Exit" on 2> "$data"
|
|
||||||
sel=$?
|
|
||||||
case $sel in
|
|
||||||
1) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
255) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
|
||||||
case $(cat "$data") in
|
|
||||||
1) icecast_import_from_directory;;
|
1) icecast_import_from_directory;;
|
||||||
2) icecast_import_from_usb;;
|
2) icecast_import_from_usb;;
|
||||||
3) icecast_format_drive;;
|
3) icecast_format_drive;;
|
||||||
|
@ -443,10 +439,7 @@ function configure_interactive_icecast {
|
||||||
start_icecast;;
|
start_icecast;;
|
||||||
10) icecast_set_stream_name;;
|
10) icecast_set_stream_name;;
|
||||||
11) icecast_set_maximum_streams;;
|
11) icecast_set_maximum_streams;;
|
||||||
12) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue