* added support to Emerge -repository w/ repo/*
[t2sde.git] / package / network / ntp / ntpd.init
blob8e6d5b6df0c1f3705eaa00c3d807033c31a0c536
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/ntp/ntpd.init
3 # Copyright (C) 2004 - 2023 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
5
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 # Desc: The Network Time Protocol Daemon
14 # Runlevel: 25 rcX
17 main_begin
19     block_begin(start, `Starting ntpd')
20         if [ "$(pidof D_bindir/ntpd)" ]
21         then
22                 echo "ntp daemon already running. ntp start aborted"
23 IN              error=1
24         else
25                 check(`(D_bindir/ntpd -g -q -c /etc/ntp.conf && D_bindir/ntpd -c /etc/ntp.conf) > /dev/null') &
26         fi
27     block_end
29     block_begin(stop, `Stopping ntpd')
30         check(`killall ntpd')
31     block_end
33 main_end