diff --git a/mysqlbu-scripts.sh b/mysqlbu-scripts.sh index 4929be5..0788197 100755 --- a/mysqlbu-scripts.sh +++ b/mysqlbu-scripts.sh @@ -37,6 +37,8 @@ ADD_CRONTAB(){ read -n 1 -s -p "Press any key to continue" } DELETE_BACKUP() { + if [ "$1" = "M" ] || [ "$1" = "m" ]; then MAIN_MENU; + elif [ "$1" = "Q" ] || [ "$1" = "q" ]; then EXIT1; fi declare -A tbus tba=1 for day in $BACKUP_PATH* ; do @@ -69,11 +71,8 @@ DELETE_BACKUP() { echo "" echo -e "${idsCL[Green]}Backup has been deleted${idsCL[Default]}" read -n 1 -s -p "Press any key to continue";; - [Mm]) MAIN_MENU;; - [Qq]) EXIT1;; - *) echo "Thats an invaild option,"; - echo "please select a valid option only."; - sleep 1;; + + * ) DELETE_MENU;; esac } MAIN_MENU() {