Files
Nomarchy/features/scripts/utils/nomarchy-update-time
Bernardo Magri 1e6becd42d
All checks were successful
Check / eval-and-lint (push) Successful in 7m5s
fix(scripts): improve offline resilience and restore missing update scripts
2026-06-01 20:07:08 +01:00

19 lines
376 B
Bash
Executable File

#!/usr/bin/env bash
# Nomarchy Time Sync Script
# Force sync system time using systemd-timesyncd
set -e
echo "Syncing system time..."
if ! sudo systemctl restart systemd-timesyncd; then
echo "Error: Failed to restart systemd-timesyncd. Check internet connection."
exit 1
fi
# Wait a moment for sync
sleep 2
echo "Current time: $(date)"
echo "Time sync complete."