mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
✨ Initial add-on code
This commit is contained in:
parent
416e586602
commit
344e8f48be
20 changed files with 810 additions and 0 deletions
27
vscode/rootfs/etc/cont-init.d/10-requirements.sh
Normal file
27
vscode/rootfs/etc/cont-init.d/10-requirements.sh
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: Visual Studio Code
|
||||
# This files check if all user configuration requirements are met
|
||||
# ==============================================================================
|
||||
bashio::config.require.ssl
|
||||
|
||||
if ! bashio::config.true 'leave_front_door_open'; then
|
||||
if ! bashio::config.true 'i_like_to_be_pwned'; then
|
||||
bashio::config.require.safe_password
|
||||
else
|
||||
bashio::config.require.password
|
||||
fi
|
||||
fi
|
||||
|
||||
if bashio::config.true 'leave_front_door_open' \
|
||||
&& bashio::config.true 'ssl';
|
||||
then
|
||||
bashio::log.fatal
|
||||
bashio::log.fatal "Due to a bug in code-server (which this add-on uses),"
|
||||
bashio::log.fatal "it is impossible to disable authentication while"
|
||||
bashio::log.fatal "using SSL."
|
||||
bashio::log.fatal
|
||||
bashio::log.fatal "Please enable authentication and set a password."
|
||||
bashio::log.fatal
|
||||
bashio::exit.nok
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue