Carlos E. R. wrote:
I want to restart ntpd on return from hibernation. Main reason is to make sure that the pool of servers is correct (can be days later than the previous time), and to ensure correct time, not knowing what ntpd does on hibernation (nothing is logged, so it probably does nothing).
So I wonder what is the correct way of achieving this.
The following works for me: ---------------------- # /etc/systemd/system/kkk999.service # ExecStart is executed on wake up from 'sleep' (suspend or hibernate). [Install] WantedBy=sleep.target [Unit] Description=kkk999 After=systemd-suspend.service systemd-hybrid-sleep.service systemd-hibernate.service [Service] Type=simple ExecStart=/usr/bin/systemctl restart ntpd ----------------------------- Not thoroughly tested and not tested with ntpd. -- Per Jessen, Zürich (9.8°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes