فهرست منبع

Merge pull request #577 from K2rool/patch-2

Added getting current timezone via /etc/localtime
André Peters 8 سال پیش
والد
کامیت
9b4ef99084
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      generate_config.sh

+ 1 - 1
generate_config.sh

@@ -16,7 +16,7 @@ if [ -z "$MAILCOW_HOSTNAME" ]; then
   read -p "Hostname (FQDN): " -ei "mx.example.org" MAILCOW_HOSTNAME
 fi
 
-[[ -a /etc/timezone ]] && TZ=$(cat /etc/timezone)
+[[ -a /etc/timezone ]] && TZ=$(cat /etc/timezone) || [[ -a /etc/localtime ]] && TZ=$(readlink /etc/localtime|sed -n 's|^.*zoneinfo/||p')
 if [ -z "$TZ" ]; then
   read -p "Timezone: " -ei "Europe/Berlin" TZ
 else