mirror of
https://github.com/hassio-addons/addon-debian-base.git
synced 2025-05-07 04:31:30 +00:00
Configure timezone automatically (#108)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
dde8860e6c
commit
4ace9ffa71
1 changed files with 11 additions and 0 deletions
11
base/rootfs/etc/cont-init.d/02-set-timezone.sh
Executable file
11
base/rootfs/etc/cont-init.d/02-set-timezone.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue