mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Update 99-run.sh
This commit is contained in:
@@ -85,12 +85,20 @@ else
|
|||||||
bashio::log.info "Default username/password : admin/admin"
|
bashio::log.info "Default username/password : admin/admin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set base folder
|
||||||
if bashio::config.has_value 'base_folder'; then
|
if bashio::config.has_value 'base_folder'; then
|
||||||
BASE_FOLDER=$(bashio::config 'base_folder')
|
BASE_FOLDER=$(bashio::config 'base_folder')
|
||||||
else
|
else
|
||||||
BASE_FOLDER=/
|
BASE_FOLDER=/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Disable thumbnails
|
||||||
|
if bashio::config.true 'disable_thumbnails'; then
|
||||||
|
DISABLE_THUMBNAILS="--disable-thumbnails"
|
||||||
|
else
|
||||||
|
DISABLE_THUMBNAILS=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove configuration file
|
# Remove configuration file
|
||||||
if [ -f /.filebrowser.json ]; then
|
if [ -f /.filebrowser.json ]; then
|
||||||
rm /.filebrowser.json
|
rm /.filebrowser.json
|
||||||
@@ -99,7 +107,7 @@ fi
|
|||||||
bashio::log.info "Starting..."
|
bashio::log.info "Starting..."
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
/./filebrowser --disable-preview-resize --disable-type-detection-by-header --cache-dir="/cache" $CERTFILE $KEYFILE --root="$BASE_FOLDER" --address=0.0.0.0 --port=8080 --database=/config/filebrowser.dB "$NOAUTH" &
|
/./filebrowser --disable-preview-resize --disable-type-detection-by-header --cache-dir="/cache" $CERTFILE $KEYFILE --root="$BASE_FOLDER" --address=0.0.0.0 --port=8080 --database=/config/filebrowser.dB "$NOAUTH" "$DISABLE_THUMBNAILS" &
|
||||||
bashio::net.wait_for 8080 localhost 900 || true
|
bashio::net.wait_for 8080 localhost 900 || true
|
||||||
bashio::log.info "Started !"
|
bashio::log.info "Started !"
|
||||||
exec nginx
|
exec nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user