From 794cbc9be38eb04dcc89561ebe52e7c0e1280e12 Mon Sep 17 00:00:00 2001 From: dzhuang Date: Wed, 10 Jan 2024 18:09:58 +0800 Subject: [PATCH] Fix auto quit. --- docker-compose.yaml | 12 +++++++++++- rootfs/startapp.sh | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index a964c4a..a1b7f63 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: '3' services: tinymediamanager_service: - image: dzhuang/tinymediamanager-docker:v5-latest + image: dzhuang/tinymediamanager:latest-v5 container_name: tinymediamanager-v5 ports: - 5800:5800 @@ -14,3 +14,13 @@ services: GROUP_ID: 1000 USER_ID: 0 TZ: Asia/Hong_Kong + + # Enable image/container auto update + watchtower: + image: containrrr/watchtower + container_name: watchtower + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + TZ: Asia/Shanghai + command: --interval 3600 tinymediamanager-v5 --cleanup diff --git a/rootfs/startapp.sh b/rootfs/startapp.sh index e4009b8..4b7bccf 100644 --- a/rootfs/startapp.sh +++ b/rootfs/startapp.sh @@ -20,7 +20,7 @@ getpid_tmm() { fi fi if [ "$PID" = "UNSET" ]; then - PID="$(ps -o pid,args | grep -w "tmm.jar" | grep -vw grep | tr -s ' ' | cut -d' ' -f2)" + PID="$(ps -o pid,args | grep -w "/config/tinyMediaManager" | grep -vw grep | tr -s ' ' | cut -d' ' -f2)" fi echo "${PID:-UNSET}" }