Artix Linux Forum

Init systems => dinit => Topic started by: softexpert@gmail.com on 19 October 2024, 17:02:59

Title: [NEW SERVICE] ntpd-rs instead of openntpd
Post by: softexpert@gmail.com on 19 October 2024, 17:02:59
Hello,

Today I installed and activated a new NTP client (https://docs.ntpd-rs.pendulum-project.org/)  (which can work also as a server, but it is outside of the scope of my current presentation) that implements the NTP and NTS protocols (see documentation (https://docs.ntpd-rs.pendulum-project.org/guide/nts/)); it is developed in Rust - hopefully it is fast, robust and secure.

I have disabled the default NTP client (openntpd) since it was failing to synchronize the clock.

The AUR package (https://aur.archlinux.org/packages/ntpd-rs) builds it from source, but we still need the dinit service description; well, here it is ...

There are two things we need to know related to this configuration:

If somebody has ideas about how to improve this service, your suggestions are welcome !

Here is the ntpd-rs service description file
Code: [Select]
# ntpd-rs 
type            = process
command         = /usr/bin/ntp-daemon --log-level=info
start-timeout   = 60
smooth-recovery = true
socket-listen   = /var/run/ntpd-rs/observe
# run-as          = ntp
log-type        = file
logfile         = /var/log/dinit/ntpd-rs.log
depends-on      = network.target
before          = time-sync.target
load-options    = export-service-name
depends-ms      = ntpd-rs-pre

And the ntpd-rs-pre script description file
Code: [Select]
type        = scripted
command     = mkdir -p /run/ntpd-rs/
depends-on  = local.target
before      = ntpd-rs