#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: portainer_agent
# Runs some initializations for portainer_agent
# ==============================================================================

bashio::require.unprotected

bashio::log.info "Starting app"

# Launch app
cd /app || true
./agent "$PORTAINER_AGENT_ARGS" 2>/dev/null || ./agent
