Ticket #2812: ntp

File ntp, 489 bytes (added by Arthur Demchenkov, 15 years ago)

NTP init script

Line 
1#!/bin/sh
2# Begin $rc_base/init.d/ntp
3
4#$LastChangedBy: spinal $
5#$Date: Sat, 20 Dec 2008 16:47:02 +0200 $
6
7. /etc/sysconfig/rc
8. $rc_functions
9
10case "$1" in
11 start)
12 boot_mesg "Starting ntpd..."
13 loadproc /usr/sbin/ntpd -g
14 ;;
15
16 stop)
17 boot_mesg "Stopping ntpd..."
18 killproc /usr/sbin/ntpd
19 ;;
20
21 restart)
22 $0 stop
23 sleep 1
24 $0 start
25 ;;
26
27 status)
28 statusproc /usr/sbin/ntpd
29 ;;
30
31 *)
32 echo "Usage: $0 {start|stop|restart|status}"
33 exit 1
34 ;;
35esac
36
37# End $rc_base/init.d/ntp