mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Update run
This commit is contained in:
@@ -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[@]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user