Update powerwall.sh

This commit is contained in:
2023-05-15 22:21:45 -05:00
parent 212a7a3a44
commit 3922a223fa

View File

@@ -333,8 +333,7 @@ RESTARTALL_SERVICES(){
} }
STOPALL_SERVICES(){ STOPALL_SERVICES(){
for srvc in "${POWERWALL_SERVICES[@]}"; do for srvc in "${POWERWALL_SERVICES[@]}"; do
echo "Stopping $srvc" SERVICE_MNG ${srvc} stop
/bin/systemctl stop $srvc
done done
} }
STARTALL_SERVICES(){ STARTALL_SERVICES(){
@@ -343,6 +342,10 @@ STARTALL_SERVICES(){
/bin/systemctl start $srvc /bin/systemctl start $srvc
done done
} }
SERVICE_MNG(){
echo "${2^}ing ${1}"
/bin/systemctl ${2} ${1}
}
STOP_SERVICE(){ STOP_SERVICE(){
echo "stop: ${1}" echo "stop: ${1}"
service_pid=`systemctl show --property MainPID --value ${POWERWALL_SERVICES[${1}]}` service_pid=`systemctl show --property MainPID --value ${POWERWALL_SERVICES[${1}]}`