Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
🔨 Improve Portainer service script
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Feb 25, 2020
1 parent 48731d3 commit e8f38cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions portainer/rootfs/etc/services.d/portainer/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Runs portainer
# ==============================================================================
declare -a options
export AGENT_SECRET

bashio::log.info 'Starting Portainer...'

Expand All @@ -28,5 +29,10 @@ if ! bashio::fs.file_exists "/data/hidden"; then
touch /data/hidden
fi

# Export agent secret, if defined
if bashio::config.has_value 'agent_secret' ; then
AGENT_SECRET=$(bashio::config 'agent_secret')
fi

# Run Portainer
exec /opt/portainer/portainer "${options[@]}"

0 comments on commit e8f38cf

Please sign in to comment.