mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Update 99-run.sh
This commit is contained in:
@@ -17,9 +17,9 @@ fi
|
|||||||
# download latest version
|
# download latest version
|
||||||
|
|
||||||
if [ "$VERBOSE" = true ]; then
|
if [ "$VERBOSE" = true ]; then
|
||||||
curl -J -L -o /tmp/joal.tar.gz $(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")
|
curl -J -L -o /tmp/joal.tar.gz "$(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")"
|
||||||
else
|
else
|
||||||
curl -s -S -J -L -o /tmp/joal.tar.gz $(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz") >/dev/null
|
curl -s -S -J -L -o /tmp/joal.tar.gz "$(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")" >/dev/null
|
||||||
fi
|
fi
|
||||||
mkdir -p /data/joal
|
mkdir -p /data/joal
|
||||||
tar zxvf /tmp/joal.tar.gz -C /data/joal >/dev/null
|
tar zxvf /tmp/joal.tar.gz -C /data/joal >/dev/null
|
||||||
@@ -45,20 +45,20 @@ ln -sf /config/addons_config/joal/config.json /data/joal/config.json
|
|||||||
# SET VARIABLES #
|
# SET VARIABLES #
|
||||||
###############
|
###############
|
||||||
|
|
||||||
declare port
|
#declare port
|
||||||
declare certfile
|
#declare certfile
|
||||||
declare ingress_interface
|
declare ingress_interface
|
||||||
declare ingress_port
|
declare ingress_port
|
||||||
declare keyfile
|
#declare keyfile
|
||||||
|
|
||||||
INGRESSURL=$(bashio::config 'local_ip_port')$(bashio::addon.ingress_url)
|
#INGRESSURL=$(bashio::config 'local_ip_port')$(bashio::addon.ingress_url)
|
||||||
host_port=$(bashio::core.port)
|
host_port=$(bashio::core.port)
|
||||||
ingress_url=$(bashio::addon.ingress_entry)
|
ingress_url=$(bashio::addon.ingress_entry)
|
||||||
ADDONPORT=$(bashio::addon.port "8081")
|
ADDONPORT=$(bashio::addon.port "8081")
|
||||||
host_ip=$(bashio::network.ipv4_address)
|
host_ip=$(bashio::network.ipv4_address)
|
||||||
host_ip=${host_ip%/*}
|
host_ip=${host_ip%/*}
|
||||||
UIPATH=$(bashio::config 'ui_path')
|
UIPATH=$(bashio::config 'ui_path')
|
||||||
port=$(bashio::addon.port 80)
|
#port=$(bashio::addon.port 80)
|
||||||
ingress_port=$(bashio::addon.ingress_port)
|
ingress_port=$(bashio::addon.ingress_port)
|
||||||
ingress_interface=$(bashio::addon.ip_address)
|
ingress_interface=$(bashio::addon.ip_address)
|
||||||
|
|
||||||
@@ -85,9 +85,9 @@ mkdir -p /var/log/nginx && touch /var/log/nginx/error.log
|
|||||||
###############
|
###############
|
||||||
|
|
||||||
if [ "$VERBOSE" = true ]; then
|
if [ "$VERBOSE" = true ]; then
|
||||||
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
|
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"
|
||||||
else
|
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
|
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 &
|
fi &
|
||||||
bashio::log.info "Please wait, loading..."
|
bashio::log.info "Please wait, loading..."
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ exec nginx &
|
|||||||
if bashio::config.has_value 'run_duration'; then
|
if bashio::config.has_value 'run_duration'; then
|
||||||
RUNTIME=$(bashio::config 'run_duration')
|
RUNTIME=$(bashio::config 'run_duration')
|
||||||
bashio::log.info "Addon will stop after $RUNTIME"
|
bashio::log.info "Addon will stop after $RUNTIME"
|
||||||
sleep $RUNTIME &&
|
sleep "$RUNTIME" &&
|
||||||
bashio::log.info "Timeout achieved, addon will stop !" &&
|
bashio::log.info "Timeout achieved, addon will stop !" &&
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user