From 398c8acbbdd7b092d8ad397d4aa66834a0224a4e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 22 May 2023 16:30:06 +0200 Subject: [PATCH] Allow running without arguments https://github.com/alexbelgium/hassio-addons/issues/565#issuecomment-1557319726 --- portainer_agent/rootfs/etc/services.d/portainer_agent/run | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/portainer_agent/rootfs/etc/services.d/portainer_agent/run b/portainer_agent/rootfs/etc/services.d/portainer_agent/run index 4041b1b95..ed08c3555 100644 --- a/portainer_agent/rootfs/etc/services.d/portainer_agent/run +++ b/portainer_agent/rootfs/etc/services.d/portainer_agent/run @@ -11,4 +11,8 @@ bashio::log.info "Starting app" # Launch app cd /app || true -./agent "$PORTAINER_AGENT_ARGS" 2>/dev/null || ./agent +if bashio::config.has_value 'PORTAINER_AGENT_ARGS'; then + ./agent "$PORTAINER_AGENT_ARGS" 2>/dev/null +else + ./agent +fi