mirror of
https://github.com/hassio-addons/addon-home-panel.git
synced 2025-05-04 19:01:21 +00:00
🔥 🔨 Remove no longer required init script and update api run script
This commit is contained in:
parent
e1ed860849
commit
1947692746
2 changed files with 9 additions and 17 deletions
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Timmo Hass.io Add-ons: Home Panel
|
||||
# This copies the api files to their respective locations
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
certfile="/ssl/$(hass.config.get 'certfile')"
|
||||
keyfile="/ssl/$(hass.config.get 'keyfile')"
|
||||
|
||||
if hass.config.true 'ssl'; then
|
||||
hass.log.info "Copy SSL certs to API directory.."
|
||||
cp "$certfile" /opt/api/fullchain.pem
|
||||
cp "$keyfile" /opt/api/privkey.pem
|
||||
fi
|
|
@ -11,4 +11,12 @@ hass.log.info "Run API.."
|
|||
# shellcheck disable=SC2164
|
||||
cd /opt/api
|
||||
|
||||
DB_PATH=/config/home-panel.db CONFIG_PATH=/config/$(hass.config.get 'config_file') node index.js
|
||||
DB_PATH=/config/home-panel.db
|
||||
CONFIG_PATH=/config/$(hass.config.get 'config_file')
|
||||
|
||||
if hass.config.true 'ssl'; then
|
||||
SSL_PATH_CERT="/ssl/$(hass.config.get 'certfile')"
|
||||
SSL_PATH_KEY="/ssl/$(hass.config.get 'keyfile')"
|
||||
fi
|
||||
|
||||
exec node index.js
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue