Update run

This commit is contained in:
Alexandre
2025-12-31 09:32:01 +01:00
committed by GitHub
parent 79dfd665d2
commit 3357799fa3

View File

@@ -1,19 +1,15 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# shellcheck shell=bash # shellcheck shell=bash
set -e set -euo pipefail
# ==============================================================================
# Home Assistant Community Add-on: portainer_agent
# Runs some initializations for portainer_agent
# ==============================================================================
bashio::require.unprotected bashio::require.unprotected
bashio::log.info "Starting app" bashio::log.info "Starting app"
# Launch app cd /app || exit 1
cd /app || true
args=()
if bashio::config.has_value 'PORTAINER_AGENT_ARGS'; then if bashio::config.has_value 'PORTAINER_AGENT_ARGS'; then
./agent $PORTAINER_AGENT_ARGS read -r -a args <<<"$(bashio::config 'PORTAINER_AGENT_ARGS')"
else
./agent
fi fi
exec ./agent "${args[@]}"