Align folders with updated upstream name

This commit is contained in:
Alexandre
2022-12-06 16:28:12 +01:00
parent eb5bb6d078
commit 9fab19ae2d
47 changed files with 3 additions and 3 deletions

View File

@@ -1,12 +0,0 @@
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Vaultwarden
# Take down the S6 supervision tree when Nginx fails
# ==============================================================================
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
bashio::log.warning "NGINX crashed, halting add-on"
/run/s6/basedir/bin/halt
fi
bashio::log.info "NGINX stopped, restarting..."

View File

@@ -1,82 +0,0 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Bitwarden
# Runs the Vaultwarden server
# ==============================================================================
declare admin_token
declare log_level
declare request_size_limit
declare secret_key
# Set defaults
export DATA_FOLDER=/data
export ROCKET_PORT=80
export ROCKET_WORKERS=2
# Set a random secret, to remove confusing warning from logs.
secret_key=$(openssl rand -base64 32)
export ROCKET_SECRET_KEY="${secret_key}"
# Find the matching log level
if bashio::config.has_value 'log_level'; then
case "$(bashio::string.lower "$(bashio::config 'log_level')")" in
all | trace)
log_level="trace"
;;
debug)
log_level="debug"
;;
info | notice)
log_level="info"
;;
warning)
log_level="warn"
;;
error | fatal)
log_level="error"
;;
off)
log_level="off"
;;
esac
export LOG_LEVEL="${log_level}"
fi
# Show admin token in the log, if config does not exist.
if ! bashio::fs.file_exists '/data/config.json'; then
admin_token=$(openssl rand -base64 48)
export ADMIN_TOKEN="${admin_token}"
bashio::log.info
bashio::log.info
bashio::log.info "READ THIS CAREFULLY! READ THIS CAREFULLY!"
bashio::log.info
bashio::log.info
bashio::log.info "This is your temporary random admin token/password!"
bashio::log.info
bashio::log.info "${admin_token}"
bashio::log.info
bashio::log.info "Be sure to change it in the admin panel, as soon as possible."
bashio::log.info
bashio::log.info "After you have changed ANY setting in the admin panel,"
bashio::log.info "the add-on will NOT generate a new token on each start"
bashio::log.info "and stops showing this message."
bashio::log.info
fi
# API request size limit
if bashio::config.has_value 'request_size_limit'; then
request_size_limit=$(bashio::config 'request_size_limit')
export ROCKET_LIMITS="{json=${request_size_limit}}"
fi
# Always enable Websockets
export WEBSOCKET_ENABLED=true
export WEBSOCKET_PORT=8080
# Run the Bitwarden server
bashio::log.info 'Starting the Vaultwarden server...'
cd /opt || bashio::exit.nok
exec ./vaultwarden

View File

@@ -1,9 +0,0 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Home Assistant Community Add-on: Bitwarden
# Take down the S6 supervision tree when Nginx fails
# ==============================================================================
if { s6-test ${1} -ne 0 }
if { s6-test ${1} -ne 256 }
s6-svscanctl -t /var/run/s6/services

View File

@@ -1,10 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Bitwarden
# Runs the Nginx daemon
# ==============================================================================
bashio::net.wait_for 80
bashio::log.info "Starting NGinx..."
exec nginx