Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup for timezone
Browse files Browse the repository at this point in the history
shunk031 committed Feb 8, 2024

Verified

This commit was signed with the committer’s verified signature.
shunk031 Shunsuke KITADA
1 parent b4462d2 commit ed76ebf
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{{ if eq .chezmoi.os "linux" -}}
{{ if eq .chezmoi.osRelease.idLike "debian" -}}
{{ include "../install/ubuntu/common/pyenv.sh" }}
{{ if eq .system "server" -}}
{{ include "../install/ubuntu/server/setup_timezone.sh" }}
{{ end -}}
{{ include "../install/ubuntu/common/pyenv.sh" }}
{{ end -}}
{{ end -}}
19 changes: 19 additions & 0 deletions install/ubuntu/server/setup_timezone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -Eeuo pipefail

if [ "${DOTFILES_DEBUG:-}" ]; then
set -x
fi

function main() {
export TZ="Asia/Tokyo"
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
echo $TZ > /etc/timezone

DEBIAN_FRONTEND="noninteractive" apt-get install -y tzdata
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main
fi

0 comments on commit ed76ebf

Please sign in to comment.