mirror of
https://github.com/hassio-addons/addon-ubuntu-base.git
synced 2025-05-07 04:11:26 +00:00
✨ Adds system information to add-on crash message
This commit is contained in:
parent
f8908e698c
commit
a8c3961963
1 changed files with 17 additions and 0 deletions
|
@ -3,8 +3,25 @@
|
|||
# Community Hass.io Add-ons: Base Images
|
||||
# Displays an message right before terminating in case something went wrong
|
||||
# ==============================================================================
|
||||
# shellcheck source=base/rootfs/usr/lib/hassio-addons/base.sh
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
declare HASSIO_TOKEN
|
||||
|
||||
if [[ "${S6_STAGE2_EXITED}" -ne 0 ]]; then
|
||||
|
||||
if hass.api.supervisor.ping; then
|
||||
# shellcheck disable=SC2034
|
||||
HASSIO_TOKEN=$(</var/run/s6/container_environment/HASSIO_TOKEN)
|
||||
echo '-----------------------------------------------------------'
|
||||
echo -n " v$(hass.addon.version)" && \
|
||||
echo -n " / $(hass.api.supervisor.info.arch)" && \
|
||||
echo -n " / $(hass.api.host.info.operating_system)" && \
|
||||
echo -n " / HA $(hass.api.homeassistant.info.version)" && \
|
||||
echo -n " / SU $(hass.api.supervisor.info.version)"
|
||||
echo " / $(hass.api.supervisor.info.channel)"
|
||||
fi
|
||||
|
||||
echo '-----------------------------------------------------------'
|
||||
echo ' Oops! Something went wrong.'
|
||||
echo ' '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue