tiny interface cleanup and more verbose start/stop

pull/2/head
riley 1 year ago
parent 54daf4b532
commit 4733eed42d

@ -9,7 +9,7 @@ local m, s, o
m = taskd.docker_map("nodered", "nodered", "/usr/libexec/apps/nodered/nodered.sh", m = taskd.docker_map("nodered", "nodered", "/usr/libexec/apps/nodered/nodered.sh",
translate("Nodered"), translate("Nodered"),
translate("Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.") translate("Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.")
.. translate("Official website:") .. ' <a href=\"https://www.nodered.org/\" target=\"_blank\">https://www.nodered.org/</a>') .. "<br/>" .. translate("Official website:") .. ' <a href=\"https://www.nodered.org/\" target=\"_blank\">https://www.nodered.org/</a>')
s = m:section(SimpleSection, translate("Service Status")) s = m:section(SimpleSection, translate("Service Status"))
s:append(Template("nodered/status")) s:append(Template("nodered/status"))

@ -87,7 +87,17 @@ case "${ACTION}" in
;; ;;
"start" | "stop" | "restart") "start" | "stop" | "restart")
APP_NAME="node-red" APP_NAME="node-red"
CONTAINER_IDS=$(docker ps -a --filter "ancestor=${APP_NAME}" --format '{{.ID}}') CONTAINER_IDS=$(docker ps -a | grep "$APP_NAME" | awk '{print $1}')
# Echo action message
if [ "$ACTION" == "start" ]; then
echo "Starting $APP_NAME container(s)"
elif [ "$ACTION" == "stop" ]; then
echo "Stopping $APP_NAME container(s)"
elif [ "$ACTION" == "restart" ]; then
echo "Restarting $APP_NAME container(s)"
fi
for ID in $CONTAINER_IDS; do for ID in $CONTAINER_IDS; do
docker "${ACTION}" "${ID}" docker "${ACTION}" "${ID}"
done done

Loading…
Cancel
Save