20 lines
727 B
Bash
20 lines
727 B
Bash
#!/usr/bin/with-contenv bashio
|
|
# Starts Bamboo with the address and token from the add-on's configuration.
|
|
set -e
|
|
|
|
url="$(bashio::config 'hammerhead_url')"
|
|
token="$(bashio::config 'token')"
|
|
|
|
if [ -z "${url}" ] || [ -z "${token}" ]; then
|
|
bashio::log.fatal "Set the Hammerhead address and the site token in this add-on's Configuration tab, then start it again."
|
|
bashio::exit.nok
|
|
fi
|
|
|
|
# Settings go in through the environment so the token does not show up in the process list.
|
|
export BAMBOO_HAMMERHEAD="${url%/}"
|
|
export BAMBOO_TOKEN="${token}"
|
|
|
|
bashio::log.info "Starting $(bamboo -version), connecting to ${BAMBOO_HAMMERHEAD}"
|
|
# /data survives restarts and updates; it holds this site's WireGuard key.
|
|
exec bamboo -data /data
|