mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-04 14:54:07 +02:00
Noauth
This commit is contained in:
@@ -152,16 +152,27 @@ PGID=0
|
|||||||
# LAUNCH FILEBROWSER #
|
# LAUNCH FILEBROWSER #
|
||||||
######################
|
######################
|
||||||
|
|
||||||
|
NOAUTH=""
|
||||||
|
|
||||||
if bashio::config.true 'NoAuth'; then
|
if bashio::config.true 'NoAuth'; then
|
||||||
/./filebrowser config init || true
|
if ! bashio::fs.file_exists "/data/noauth"; then
|
||||||
/./filebrowser config set --auth.method=noauth
|
rm /data/auth || true
|
||||||
|
touch /data/noauth
|
||||||
|
rm /config/filebrowser/filebrowser.dB || true
|
||||||
|
NOAUTH="--no-auth"
|
||||||
|
bashio::log.warning "Auth method change, database reset"
|
||||||
|
fi
|
||||||
bashio::log.info "NoAuth option selected"
|
bashio::log.info "NoAuth option selected"
|
||||||
else
|
else
|
||||||
/./filebrowser config init || true
|
if ! bashio::fs.file_exists "/data/auth"; then
|
||||||
/./filebrowser config set --auth.method=json
|
rm /data/noauth || true
|
||||||
|
touch /data/auth
|
||||||
|
rm /config/filebrowser/filebrowser.dB || true
|
||||||
|
bashio::log.warning "Auth method change, database reset"
|
||||||
|
fi
|
||||||
bashio::log.info "Default username/password : admin/admin"
|
bashio::log.info "Default username/password : admin/admin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bashio::log.info "Please wait 1 or 2 minutes to allow the server to load"
|
bashio::log.info "Please wait 1 or 2 minutes to allow the server to load"
|
||||||
|
|
||||||
/./filebrowser $CERTFILE $KEYFILE --root=/ --address=0.0.0.0 --database=/config/filebrowser/filebrowser.dB
|
/./filebrowser $CERTFILE $KEYFILE --root=/ --address=0.0.0.0 --database=/config/filebrowser/filebrowser.dB $NOAUTH
|
||||||
|
|||||||
Reference in New Issue
Block a user