From 8e1f95551903798bff33b1f1dc11f8430265842b Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Sun, 17 Aug 2025 15:04:27 +0200 Subject: [PATCH] Update auto_post_install.sh --- scripts/post_install/auto_post_install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/post_install/auto_post_install.sh b/scripts/post_install/auto_post_install.sh index 70a1b67..74d96eb 100644 --- a/scripts/post_install/auto_post_install.sh +++ b/scripts/post_install/auto_post_install.sh @@ -172,7 +172,6 @@ configure_time_sync() { msg_warn "$(translate "Failed to obtain public IP address")" timezone="UTC" else - timezone=$(curl -s "https://ipapi.co/${this_ip}/timezone") if [ -z "$timezone" ]; then msg_warn "$(translate "Failed to determine timezone from IP address")" @@ -181,16 +180,18 @@ configure_time_sync() { msg_ok "$(translate "Found timezone $timezone for IP $this_ip")" fi fi - + timedatectl set-timezone "$timezone" + msg_info "$(translate "Enabling automatic time synchronization...")" if timedatectl set-ntp true; then msg_ok "$(translate "Time settings configured - Timezone:") $timezone" register_tool "time_sync" true + + systemctl restart postfix 2>/dev/null || true else msg_error "$(translate "Failed to enable automatic time synchronization")" fi - } # ==========================================================