diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-01-23 06:49:25 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-01-23 06:49:25 +0000 |
| commit | 1aa3bc74170f10a4285827efa2748d1d6c2e4613 (patch) | |
| tree | 3fc6b79944f119dddf85a1cf8758cfbbab607cbe /examples/source/ntpclient | |
| parent | 3c61b2916c56bfa8d3ce7a6a5480eb93c2ed1470 (diff) | |
| download | s6-rc-1aa3bc74170f10a4285827efa2748d1d6c2e4613.tar.gz | |
New example batch of service definitions
Diffstat (limited to 'examples/source/ntpclient')
| -rw-r--r-- | examples/source/ntpclient/dependencies.d/dns-cache | 0 | ||||
| -rw-r--r-- | examples/source/ntpclient/dependencies.d/init-clock | 0 | ||||
| -rw-r--r-- | examples/source/ntpclient/notification-fd | 1 | ||||
| -rw-r--r-- | examples/source/ntpclient/producer-for | 1 | ||||
| -rwxr-xr-x | examples/source/ntpclient/run | 56 | ||||
| -rw-r--r-- | examples/source/ntpclient/type | 1 |
6 files changed, 0 insertions, 59 deletions
diff --git a/examples/source/ntpclient/dependencies.d/dns-cache b/examples/source/ntpclient/dependencies.d/dns-cache deleted file mode 100644 index e69de29..0000000 --- a/examples/source/ntpclient/dependencies.d/dns-cache +++ /dev/null diff --git a/examples/source/ntpclient/dependencies.d/init-clock b/examples/source/ntpclient/dependencies.d/init-clock deleted file mode 100644 index e69de29..0000000 --- a/examples/source/ntpclient/dependencies.d/init-clock +++ /dev/null diff --git a/examples/source/ntpclient/notification-fd b/examples/source/ntpclient/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/examples/source/ntpclient/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/examples/source/ntpclient/producer-for b/examples/source/ntpclient/producer-for deleted file mode 100644 index c51cd0b..0000000 --- a/examples/source/ntpclient/producer-for +++ /dev/null @@ -1 +0,0 @@ -ntpclient-log diff --git a/examples/source/ntpclient/run b/examples/source/ntpclient/run deleted file mode 100755 index 8ded1c1..0000000 --- a/examples/source/ntpclient/run +++ /dev/null @@ -1,56 +0,0 @@ -#!/command/execlineb -P - -fdmove -c 2 1 - - -# Get the IP addresses for some NTP servers. -# Limit the DNS queries to 30 seconds: if the DNS is slower than -# that, chances are the server isn't good for us anyway. -# All the queries are parallelized, so it's fast. - -pipeline -{ - s6-setuidgid nobody - forx -p I { 0 1 2 } - importas -u I I - s6-dnsip4 -t 30000 -- ${I}.fr.pool.ntp.org -} -importas -u p1 ! - - -# Ask for a NTP exchange with the servers we get. -# If the exchange can't be completed in 5 seconds, kill it. -# All the queries are parallelized. - -pipeline -{ - s6-setuidgid ntp - forstdin -p -d"\n" NTPSERVERIP - importas -u NTPSERVERIP NTPSERVERIP - s6-sntpclock -T 5000 ${NTPSERVERIP} -} -importas -u p2 ! - - -# Take the first answer we get - -pipeline -{ - s6-setuidgid nobody - s6-head -Sc 12 -} -importas -u p3 ! - - -# Update the system clock. Accept 10 minutes of discrepancy. - -if { s6-clockadd -e 600000 } - - -# Success. Send a readiness notification, reap zombies, -# and sleep for 4 hours. - -s6-setuidgid nobody -if { fdmove 1 3 s6-echo } -wait { ${p1} ${p2} ${p3} } -s6-sleep 14400 diff --git a/examples/source/ntpclient/type b/examples/source/ntpclient/type deleted file mode 100644 index 5883cff..0000000 --- a/examples/source/ntpclient/type +++ /dev/null @@ -1 +0,0 @@ -longrun |
