mirror of
https://github.com/hassio-addons/addon-home-panel.git
synced 2025-05-05 03:11:24 +00:00
Update API to v0.4.2 and remove SSL cert copy (#2)
* ⬆️ Update api to v0.4.2 * 🔥 🔨 Remove no longer required init script and update api run script * 👕 Fix linter warning * 👕 fix linter warnings * 👕 🔥 Fix linter warnings
This commit is contained in:
parent
f6901c2545
commit
712ee031b7
3 changed files with 15 additions and 18 deletions
|
@ -13,7 +13,7 @@ RUN \
|
||||||
nodejs-current=9.11.1-r2 \
|
nodejs-current=9.11.1-r2 \
|
||||||
nginx=1.14.2-r0 \
|
nginx=1.14.2-r0 \
|
||||||
\
|
\
|
||||||
&& git clone --branch "v0.4.1" --depth=1\
|
&& git clone --branch "v0.4.2" --depth=1\
|
||||||
"https://github.com/timmo001/home-panel-api.git" /opt/api \
|
"https://github.com/timmo001/home-panel-api.git" /opt/api \
|
||||||
\
|
\
|
||||||
&& curl -J -L -o /tmp/panel.zip \
|
&& curl -J -L -o /tmp/panel.zip \
|
||||||
|
|
|
@ -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,17 @@ hass.log.info "Run API.."
|
||||||
# shellcheck disable=SC2164
|
# shellcheck disable=SC2164
|
||||||
cd /opt/api
|
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
|
||||||
|
|
||||||
|
export DB_PATH
|
||||||
|
export CONFIG_PATH
|
||||||
|
export SSL_PATH_CERT
|
||||||
|
export SSL_PATH_KEY
|
||||||
|
|
||||||
|
exec node index.js
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue