add quit to remove instance

This commit is contained in:
paukstelis
2022-07-06 20:10:35 -04:00
parent ce6d9a117d
commit d7e3a7c660

View File

@@ -470,8 +470,12 @@ remove_instance() {
echo 'Do not remove the generic instance!' | log
PS3='Select instance number to remove: '
readarray -t options < <(cat /etc/octoprint_instances | sed -n -e 's/^instance:\([[:graph:]]*\) port:.*/\1/p')
options+=("Quit")
select opt in "${options[@]}"
do
if [ "$opt" == Quit ] || [ "$opt" == generic ]; then
main_menu
fi
echo "Selected instance to remove: $opt" | log
break
done