mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Decrease time window and use curl's timeout flag
This commit is contained in:
parent
635b9b9f29
commit
0593c9ede9
@ -10,9 +10,9 @@ set -o errexit -o nounset -o pipefail
|
||||
sleep 10s
|
||||
echo "[INFO] Starting go2rtc healthcheck service..."
|
||||
|
||||
while sleep 60s; do
|
||||
while sleep 30s; do
|
||||
# Check if the service is running
|
||||
if ! timeout 10s curl -fsSL -o /dev/null http://127.0.0.1:1984/api/streams 2>&1; then
|
||||
if ! curl --connect-timeout 10 --fail --silent --show-error --output /dev/null http://127.0.0.1:1984/api/streams 2>&1; then
|
||||
echo "[ERROR] The go2rtc service is not responding to ping, restarting..."
|
||||
# We can also use -r instead of -t to send kill signal rather than term
|
||||
s6-svc -t /var/run/service/go2rtc 2>&1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user