next_menu()
############################################################################
# Press any key to continue
############################################################################
{
echo
echo "# ----------------------------------------------------------------------- #"
echo "[ ...  Press any key to continue ... ]"
read next
}

menu_sel_text()
{
echo
echo "#   Enter Menu Selection: "
}


main_menu()

{
MNUTXT=" Main Menu "
dashboard

# echo "#     Add ASM disks in bulk                                     Future    #"
# echo "#     Add HealthCheck Info for this database                    Future    #"
# echo "#     Add DBA to APEX                                           Future    #"
# echo "#     Add cron job for APEX disk size update for this database  Future    #"
# echo "#     Add databases to APEX                                               #"
# echo "#     Run and email report for Disk Sizes                       Future    #"
# echo "#     Run and email report for DBA to Projects (future)                   #"
# echo "#     Run and email report for unassigned projects to DBAs                #"
# echo "#     Server Details                                                      #"
# echo "#     Update DB Details in APEX                                           #"
# echo "#     Update disk usage for database in APEX                              #"
# echo "#     Show Instance Details                                               #"
# echo "#     Show Database Details                                               #"
# echo "#                                                                         #"
# echo "#     EPG Status                                                          #"
# echo "#     Perform APEX HealthCheck                                  Future    #"
# echo "#     Add / Update scripts for all menu items                   Future    #"

echo "# ------------------------------------------------------------------------- #"
echo "#   0.  Add "$DB_NAME" database to DBAdmin ""            14. "$DB_NAME" Info"
echo "#   1.                                                                      #"
echo "#   2.  Display Instances (as /etc/oratab)                                  #"
echo "#   3.  Check this DB against oratab                                        #"
echo "#   4.  Change Instance Environment                                         #"
echo "#   5.                                                                      #"
echo "#   6.  Check all active DBs against oratab   (future)                      #"
echo "#   7.                                                                      #"
echo "#   8.                                                                      #"
echo "#   9.                                                                      #"
echo "#  10.                                                                      #"
echo "#  11.                                                                      #"
echo "#  12.                                                                      #"
echo "#  13.  Performance Tuning Menu                                             #"
echo "# ------------------------------------------------------------------------- #"
echo "#   x.  Exit APEX Menu    21. Build & QA Menu    23. Display Menu           #"
echo "# ------------------------------------------------------------------------- #"
menu_sel_text

read x
ans=`echo $x | tr '[a-z]' '[A-Z]'`
#
case "$ans"
in
       0 )
       ###################################
       # Add database to APEX if not there
       ###################################

       # chk_existing
       # inst_InCentralRepository
       # chk_db_running
       # mch_InCentralRepository
       # db_InCentralRepository
       # get_db_details
       # insertDB_InCentralRepository

       clear
       echo
       echo
       if [ $database_id = "" ]; then
          insertDB_APEX
       else
          echo "Database found in DBAdmin  (record # "$database_id")"
       fi
       next_menu;
       ;;


       1 )
       next_menu;
       ;;

       2 )
       disp_inst
       rest_save
       next_menu;
       ;;

       3 )
       chk_db_nm2dblst
       next_menu;
       ;;

       4 )
       clear
       disp_inst
       echo
       echo " Enter Instance Name: "
       echo
       typeset -u instnm
       read instnm
       echo $instnm
       chg_inst
       next_menu;
       ;;

       5 )
       next_menu;
       ;;

       6 )
       next_menu;
       ;;

       7 )
       next_menu;
       ;;

       8 )
       next_menu;
       ;;

       9 )
       next_menu;
       ;;

       10 )
       next_menu;
       ;;

       11 )
       # find_db
       next_menu;
       ;;

       12 )
       next_menu;
       ;;

       13 )
       MNU04=000
       echo $MNU04
       echo "Test Begin"
       while true
       do
         if [ "$MNU04" -eq 999 ]; then
            break;
            echo "This breaks"
         else
            echo "This continues"
         fi
         menu_perftune
       done
       echo "Test end"
       next_menu;
       ;;

       14 )
       get_db_details
       next_menu;
       ;;

       15 )
       # db_qa_rev
       next_menu;
       ;;

       16 )
       # db_qa
       next_menu;
       ;;

       17 )
       # update_db_details
       # find_db
       next_menu;
       ;;

       18 )
       # db_ind_size
       next_menu;
       ;;

       19 )
       # get_inst_details
       next_menu;
       ;;

       20 )
       # sho_db_details
       # get_db_details
       next_menu;
       ;;

       21 )
       MNU02=000
       echo $MNU02
       echo "Test Begin"
       while true
       do
         if [ "$MNU02" -eq 999 ]; then
            break;
            echo "This breaks"
         else
            echo "This continues"
         fi
         menu_02
       done
       echo "Test end"
       next_menu;
       ;;

       22)
       ./epg_stat.ksh
       next_menu;
       ;;

       23)
       MNU03=000
       echo $MNU03
       echo "Test Begin"
       while true
       do
         if [ "$MNU03" -eq 999 ]; then
            break;
            echo "This breaks"
         else
            echo "This continues"
         fi
         menu_03
       done
       echo "Test end"
       next_menu;
       ;;

       24)
       next_menu;
       ;;

       q|X|x )
        exit;
       ;;
       * )
        main_menu;
       ;;
   esac
}




Ready for Action?

LET'S GO!
Copyright 2024 IT Remote dot com
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram