diff --git a/powerwall.sh b/powerwall.sh index fe7abbc4..065e31e4 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -1157,8 +1157,7 @@ RESTARTALL_SERVICES(){ echo STOPALL_SERVICES echo -en "${idsCL[Yellow]}Pausing${idsCL[Default]}" - sleep 2s - # sleep 10s + sleep 6s echo -en "\033[2K\r" DIVIDER . yellow 50 STARTALL_SERVICES @@ -1190,7 +1189,7 @@ SERVICE_MNG(){ MSG="${sa} Service - ${idsCL[LightCyan]}${PW_POWERWALL_SERVICES[${1}]}" c=0; spc=''; spc1=`expr 53 - ${#MSG}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done echo -en "${idsCL[LightCyan]}${MSG}${spc}${idsCL[Default]}: " - # /bin/systemctl ${2} ${PW_POWERWALL_SERVICES[${1}]} + /bin/systemctl ${2} ${PW_POWERWALL_SERVICES[${1}]} echo -e "${idsCL[Green]}Done${idsCL[Default]}" } @@ -2381,9 +2380,8 @@ fi get-snapshots) GET_SNAPSHOTS;; service) - if [ "${2}" == "status" ]; then + if [ "${2}" == "status" ] || [ "${3}" == "status" ]; then CHECK_SERVICES - elif [ "${2}" == "all" ]; then if [ "${3}" == "stop" ]; then STOPALL_SERVICES @@ -2391,8 +2389,8 @@ fi STARTALL_SERVICES elif [ "${3}" == "restart" ]; then RESTARTALL_SERVICES - elif [ "${3}" == "status" ]; then - CHECK_SERVICES + else + echo -e "\n${idsCL[Yellow]}Invalid argument${idsCL[Default]}\n" fi else if [ "${3}" == "start" ] || [ "${3}" == "" ]; then @@ -2404,6 +2402,8 @@ fi CHECKPOWER_SERVICE elif [ "${2}" == "powerlogger" ]; then POWERLOGGER_SERVICE + else + echo -e "\n${idsCL[Yellow]}Invalid argument${idsCL[Default]}\n" fi elif [ "${3}" == "stop" ]; then @@ -2425,7 +2425,10 @@ fi elif [ "${3}" == "restart" ]; then SERVICE_MNG ${2} stop - sleep 2s + echo -en "${idsCL[Yellow]}Pausing${idsCL[Default]}" + sleep 6s + echo -en "\033[2K\r" + DIVIDER . yellow 50 SERVICE_MNG ${2} start elif [ "${3}" == "status" ]; then