turn into normal docker image (alpine) instead of hass-addon
This commit is contained in:
parent
3d8b323fb4
commit
1c3f0135f3
10 changed files with 61 additions and 164 deletions
39
plejd/entrypoint.sh
Normal file
39
plejd/entrypoint.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#! /bin/sh
|
||||
|
||||
if [ -z "${site}" ]; then
|
||||
echo "Plejd site not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${username}" ]; then
|
||||
echo "Plejd username not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${password}" ]; then
|
||||
echo "Plejd password not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${mqttUsername}" ]; then
|
||||
echo "Mqtt username not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${mqttPassword}" ]; then
|
||||
echo "Mqtt password not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir /data
|
||||
|
||||
mqttBroker="${mqttBroker:=mqtt://}" \
|
||||
includeRoomsAsLights="${includeRoomsAsLights:=false}" \
|
||||
preferCachedApiResponse="${preferCachedApiResponse:=false}" \
|
||||
updatePlejdClock="${updatePlejdClock:=false}" \
|
||||
logLevel="${logLevel:=info}" \
|
||||
connectionTimout="${connectionTimout:=2}" \
|
||||
writeQueueWaitTime="${writeQueueWaitTime:=400}" \
|
||||
envsubst <"/plejd/options.json.template" >"/data/options.json"
|
||||
|
||||
node /plejd/main.js
|
||||
Loading…
Add table
Add a link
Reference in a new issue