all-in-one/Containers/watchtower/start.sh
Simon L 1ef7945c31 increasea the loglevel for watchtower
Signed-off-by: Simon L <szaimen@e.mail.de>
2022-12-01 16:14:58 +01:00

19 lines
513 B
Bash

#!/bin/bash
# Check if socket is available and readable
if ! [ -a "/var/run/docker.sock" ]; then
echo "Docker socket is not available. Cannot continue."
exit 1
elif ! test -r /var/run/docker.sock; then
echo "Docker socket is not readable by the root user. Cannot continue."
exit 1
fi
if [ -n "$CONTAINER_TO_UPDATE" ]; then
exec /watchtower --cleanup --debug --run-once "$CONTAINER_TO_UPDATE"
else
echo "'CONTAINER_TO_UPDATE' is not set. Cannot update anything."
exit 1
fi
exec "$@"