diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 9ba522c4..d1f3e36d 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -613,9 +613,8 @@ SERVICES(){ echo -e "${idsCL[Green]}Node Service Selected: '${idsST[Bold]}${NM_SERVICES[${selsrvc}]}${idsST[Reset]}${idsCL[Green]}'${idsCL[Default]}" DIVIDER true s=1 - for srvcopt in "${!NM_SRVCOPTS[@]}"; do - do - echo " [${s}] ${srvcopts~}" + for srvcopt in "${NM_SRVCOPT[@]}"; do + echo " [${s}] ${srvcopt~}" s=`expr $s + 1` done if [ -z $action ] || [ "${action}" = "gui" ]; then @@ -623,10 +622,10 @@ SERVICES(){ fi echo " [Q] Quit" echo "" - echo -e -n "${idsCL[LightYellow]}Please select a service from above:${idsCL[Default]} " + echo -e -n "${idsCL[LightYellow]}Please select an action to run from above:${idsCL[Default]} " read selsrvcopt echo "" - if [ -z ${NM_SRVCOPTS[${selsrvcopt}]} ] && [ "${selsrvc}" != "Q" ] && [ "${selsrvc}" != "q" ] && [ "${selsrvc}" != "B" ] && [ "${selsrvc}" != "b" ]; then + if [ -z ${NM_SRVCOPT[${selsrvcopt}]} ] && [ "${selsrvcopt}" != "Q" ] && [ "${selsrvcopt}" != "q" ] && [ "${selsrvcopt}" != "B" ] && [ "${selsrvcopt}" != "b" ]; then echo "Thats an invaild option," echo "please select a valid option only." sleep 1 @@ -636,11 +635,17 @@ SERVICES(){ exit 0 elif [ "${selsrvc}" = "B" ] || [ "${selsrvc}" = "b" ]; then SERVICES + exit 0 else - + echo "nm service ${selsrvc} ${selsrvcopt}" + echo "" + DIVIDER + ENTER2CONTINUE + break fi fi done + } SERVICE(){ @@ -708,7 +713,7 @@ GUI(){ echo "" case $opt in 1) STATUS; GUI;; - 2) GUI;; + 2) SERVICES; GUI;; 3) NEW_SITE; GUI;; 4) DELSITES; GUI;; 5) GUI;; @@ -742,6 +747,7 @@ if [ ${action-x} ]; then status-check) STATUS-CHECK ${2};; set-permissions) DIVIDER; SET-PERMISSIONS ${2};; service) SERVICE ${2} ${3};; + services) SERVICES;; gui) GUI;; *) echo -e "Usage: ${idsCL[Yellow]}nodemgmt${idsCL[Default]} { ${idsCL[Yellow]}service${idsCL[Default]} [service] [action] | ${idsCL[Yellow]}status${idsCL[Default]} | ${idsCL[Yellow]}newcert${idsCL[Default]} [domain(,s)] | ${idsCL[Yellow]}certrenew${idsCL[Default]} }"