From 1f825a357fb10c9d6c0cde7cfd21d8cfa5e5ef69 Mon Sep 17 00:00:00 2001 From: Jozsef Gtta Date: Wed, 27 May 2026 12:51:38 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20notifications=20level=20warn=20=E2=80=94?= =?UTF-8?q?=20only=20email=20on=20failures,=20not=20successful=20runs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jellyfin/arr-stack/watchtower-update.sh | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 jellyfin/arr-stack/watchtower-update.sh diff --git a/jellyfin/arr-stack/watchtower-update.sh b/jellyfin/arr-stack/watchtower-update.sh new file mode 100644 index 0000000..1e82c45 --- /dev/null +++ b/jellyfin/arr-stack/watchtower-update.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Watchtower run-once update script +# Usage: watchtower-update.sh [scope] +# If scope is given, only updates containers with that scope label. +# If no scope, updates all unscoped containers. + +SCOPE=$1 +NAME="watchtower-${SCOPE:-main}-$$" + +ARGS=( + --rm + --name "$NAME" + -v /var/run/docker.sock:/var/run/docker.sock + -v /home/jgitta/.docker/config.json:/config.json:ro + -e TZ=America/Chicago + -e WATCHTOWER_NOTIFICATIONS=email + -e WATCHTOWER_NOTIFICATION_EMAIL_FROM=jgitta@jgitta.com + -e WATCHTOWER_NOTIFICATION_EMAIL_TO=jgitta@jgitta.com + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.fastmail.com + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587 + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=jgitta@jgitta.com + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=2l79229z6r4y8x8y + -e WATCHTOWER_NOTIFICATIONS_LEVEL=warn + -e WATCHTOWER_CLEANUP=true +) + +if [ -n "$SCOPE" ]; then + ARGS+=(-e WATCHTOWER_SCOPE="$SCOPE") +fi + +docker run "${ARGS[@]}" containrrr/watchtower --run-once