Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
👕 Improves token update message on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Nov 1, 2018
1 parent 53224fa commit fb6e7a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion appdaemon/rootfs/etc/cont-init.d/30-auto-token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ if [[ "$(yq read ${CONFIG_FILE} 'appdaemon.plugins.HASS.ha_url')" = "http://hass
&& "$(yq read ${CONFIG_FILE} 'appdaemon.plugins.HASS.token')" != "${HASSIO_TOKEN}"
&& "$(yq read ${CONFIG_FILE} 'appdaemon.plugins.HASS.token')" != '!secret '* ]];
then
hass.log.info 'Token is missing in the AppDaemon configuration, fixing...'
hass.log.info \
'Updating Hass.io API token in AppDaemon with the current one...'

yq write --inplace "${CONFIG_FILE}" \
'appdaemon.plugins.HASS.token' "${HASSIO_TOKEN}" \
Expand Down

0 comments on commit fb6e7a0

Please sign in to comment.