Configure timezone automatically (#108)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Felipe Santos 2022-06-09 05:56:33 -03:00 committed by GitHub
parent dde8860e6c
commit 4ace9ffa71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,11 @@
#!/command/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# Configures the timezone
# ==============================================================================
if ! bashio::var.is_empty "${TZ}"; then
bashio::log.info "Configuring timezone"
ln --symbolic --no-dereference --force "/usr/share/zoneinfo/${TZ}" /etc/localtime
echo "${TZ}" > /etc/timezone
fi