mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-04 12:20:33 +02:00
config in log
This commit is contained in:
@@ -114,6 +114,18 @@ sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s/%%path%%/${UIPATH}/g" /etc/nginx/servers/ingress.conf
|
||||
mkdir -p /var/log/nginx && touch /var/log/nginx/error.log
|
||||
|
||||
###############
|
||||
# GET ADDRESS #
|
||||
###############
|
||||
|
||||
INGRESSURL=$(bashio::config 'local_ip_port')$(bashio::addon.ingress_url)
|
||||
host_port=$(bashio::core.port)
|
||||
ingress_url=$(bashio::addon.ingress_entry)
|
||||
|
||||
echo $INGRESSURL
|
||||
echo $host_port
|
||||
echo $ingress_url
|
||||
|
||||
###############
|
||||
# LAUNCH APPS #
|
||||
###############
|
||||
@@ -123,13 +135,27 @@ if [ $VERBOSE = true ]; then
|
||||
else
|
||||
nohup java -jar /joal/joal.jar --joal-conf=/data/joal --spring.main.web-environment=true --server.port="8081" --joal.ui.path.prefix=${UIPATH} --joal.ui.secret-token=$TOKEN >/dev/null
|
||||
fi \
|
||||
& bashio::log.info "Joal started with path http://ip/${UIPATH}/ui secret token $TOKEN"
|
||||
&
|
||||
bashio::log.info "Joal started with path http://ip/${UIPATH}/ui secret token $TOKEN"
|
||||
bashio::log.info "Please wait, loading..."
|
||||
|
||||
ADDONPORT=$(bashio::addon.port "8081")
|
||||
|
||||
# Wait for transmission to become available
|
||||
bashio::net.wait_for 8081 localhost 900 || true
|
||||
bashio::log.info "... loaded, Nginx started for Ingress"
|
||||
exec nginx & \
|
||||
bashio::log.warning "Configuration for direct access (in http://homeassistant.local:${ADDONPORT}/${UIPATH}/ui):"
|
||||
bashio::log.info "... address : homeassistant.local"
|
||||
bashio::log.info "... server port : ${ADDONPORT}"
|
||||
bashio::log.info "... Path prefix : ${UIPATH}"
|
||||
bashio::log.info "... Secret token : $TOKEN"
|
||||
bashio::log.warning "Configuration for Ingress (in app):"
|
||||
bashio::log.info "... address : homeassistant.local:$host_port$ingress_url/"
|
||||
bashio::log.info "... server port : $host_port"
|
||||
bashio::log.info "... Path prefix : ${UIPATH}"
|
||||
bashio::log.info "... Secret token : $TOKEN"
|
||||
bashio::log.info "Everything loaded."
|
||||
|
||||
exec nginx &
|
||||
|
||||
###########
|
||||
# TIMEOUT #
|
||||
@@ -138,8 +164,8 @@ exec nginx & \
|
||||
if bashio::config.has_value 'run_duration'; then
|
||||
RUNTIME=$(bashio::config 'run_duration')
|
||||
bashio::log.info "Addon will stop after $RUNTIME"
|
||||
sleep $RUNTIME && \
|
||||
bashio::log.info "Timeout achieved, addon will stop !" && \
|
||||
sleep $RUNTIME &&
|
||||
bashio::log.info "Timeout achieved, addon will stop !" &&
|
||||
exit 0
|
||||
else
|
||||
bashio::log.info "Run_duration option not defined, addon will run continuously"
|
||||
|
||||
Reference in New Issue
Block a user