Make arr scripts idempotent
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -34,15 +34,9 @@ set_config_value "AnalyticsEnabled" "False"
|
||||
Prowlarr -data=/var/lib/prowlarr -nobrowser "$@" &
|
||||
PID=$!
|
||||
|
||||
HOST="http://localhost:9696$URL_BASE"
|
||||
|
||||
curl -sf --retry 10 --retry-connrefused \
|
||||
-H "X-Api-Key: $API_KEY" \
|
||||
"$HOST/api/v1/health"
|
||||
|
||||
if [ -f /etc/prowlarr/setup.sh ]; then
|
||||
if [ -f /etc/prowlarr/post-start.sh ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/prowlarr/setup.sh
|
||||
. /etc/prowlarr/post-start.sh
|
||||
fi
|
||||
|
||||
trap 'kill -INT "$PID"' INT TERM
|
||||
|
@@ -34,15 +34,9 @@ set_config_value "AnalyticsEnabled" "False"
|
||||
Radarr -data=/var/lib/radarr -nobrowser "$@" &
|
||||
PID=$!
|
||||
|
||||
HOST="http://localhost:7878$URL_BASE"
|
||||
|
||||
curl -sf --retry 10 --retry-connrefused \
|
||||
-H "X-Api-Key: $API_KEY" \
|
||||
"$HOST/api/v1/health"
|
||||
|
||||
if [ -f /etc/radarr/setup.sh ]; then
|
||||
if [ -f /etc/radarr/post-start.sh ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/radarr/setup.sh
|
||||
. /etc/radarr/post-start.sh
|
||||
fi
|
||||
|
||||
trap 'kill -INT "$PID"' INT TERM
|
||||
|
@@ -34,15 +34,9 @@ set_config_value "AnalyticsEnabled" "False"
|
||||
Sonarr -data=/var/lib/sonarr -nobrowser "$@" &
|
||||
PID=$!
|
||||
|
||||
HOST="http://localhost:8989$URL_BASE"
|
||||
|
||||
curl -sf --retry 10 --retry-connrefused \
|
||||
-H "X-Api-Key: $API_KEY" \
|
||||
"$HOST/api/v1/health"
|
||||
|
||||
if [ -f /etc/sonarr/setup.sh ]; then
|
||||
if [ -f /etc/sonarr/post-start.sh ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/sonarr/setup.sh
|
||||
. /etc/sonarr/post-start.sh
|
||||
fi
|
||||
|
||||
trap 'kill -INT "$PID"' INT TERM
|
||||
|
Reference in New Issue
Block a user