mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Update 91-run.sh
This commit is contained in:
@@ -1,8 +1,28 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
bashio::log.info "Starting nginx"
|
###############
|
||||||
nginx & true
|
# Start nginx #
|
||||||
|
###############
|
||||||
|
# Set variables
|
||||||
|
slug=autobrr
|
||||||
|
port=7474
|
||||||
|
CONFIG_LOCATION=/config/addons_config/"$slug"/config.toml
|
||||||
|
|
||||||
|
# Set UrlBase
|
||||||
|
if ! grep -q "<UrlBase>/hassioautobrr</UrlBase>" "$CONFIG_LOCATION" && ! bashio::config.true "ingress_disabled"; then
|
||||||
|
bashio::log.warning "BaseUrl not set properly, restarting"
|
||||||
|
sed -i "/baseUrl/d" /config/addons_config/autobrr/config.toml
|
||||||
|
sed -i "/# Base url/a baseUrl = \"/hassioautobrr/\"" /config/addons_config/autobrr/config.toml
|
||||||
|
bashio::addon.restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
bashio::log.info "Starting NGinx..."
|
||||||
|
exec nginx
|
||||||
|
|
||||||
|
#############
|
||||||
|
# Start app #
|
||||||
|
#############
|
||||||
|
|
||||||
bashio::log.info "Starting app"
|
bashio::log.info "Starting app"
|
||||||
exec /usr/local/bin/autobrr --config /config/addons_config/autobrr
|
exec /usr/local/bin/autobrr --config /config/addons_config/autobrr
|
||||||
|
|||||||
Reference in New Issue
Block a user