diff --git a/powerwall.sh b/powerwall.sh index 1a7900fc..603d2277 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -31,11 +31,13 @@ RESTARTALL_SERVICES(){ STOPALL_SERVICES(){ for srvc in "${!PW_POWERWALL_SERVICES[@]}"; do SERVICE_MNG ${srvc} stop + echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - '${PW_POWERWALL_SERVICES[${srvc}]}' Service Stopped" >> ${PW_LOGFILE} done } STARTALL_SERVICES(){ for srvc in "${!PW_POWERWALL_SERVICES[@]}"; do SERVICE_MNG ${srvc} start + echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - '${PW_POWERWALL_SERVICES[${srvc}]}' Service Started" >> ${PW_LOGFILE} done } SERVICE_MNG(){ @@ -884,7 +886,8 @@ fi elif [ "${2}" == "powerlogger" ]; then STOP_SERVICE powerlogger - + echo "(`date +'%Y-%m-%d %H:%M:%S'`) Service Stopped" >> ${PW_LOGPOWER} + echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - '${PW_POWERWALL_SERVICES[powerlogger]}' Service Stopped" >> ${PW_LOGFILE} fi elif [ "${3}" == "restart" ]; then