Initial add-on

This commit is contained in:
Franck Nijhof 2024-01-13 13:27:19 +01:00
parent 05fb6c4796
commit 9c57dd65e9
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
31 changed files with 2685 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Prowlarr
# Take down the S6 supervision tree when Prowlarr fails
# ==============================================================================
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
readonly exit_code_service="${1}"
readonly exit_code_signal="${2}"
readonly service="Prowlarr"
bashio::log.info \
"Service ${service} exited with code ${exit_code_service}" \
"(by signal ${exit_code_signal})"
if [[ "${exit_code_service}" -eq 256 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
fi
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
elif [[ "${exit_code_service}" -ne 0 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
fi
exec /run/s6/basedir/bin/halt
fi

View file

@ -0,0 +1,10 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Prowlarr
# Runs Prowlarr
# ==============================================================================
bashio::log.info 'Starting Prowlarr...'
exec /opt/bin/Prowlarr -nobrowser -data=/config

View file

@ -0,0 +1 @@
longrun