blob: 2d0c7668b91dfbbd685d85d6ec54d2d901dacad5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd-4.1.2.rc,v 1.2 2004/04/05 23:20:19 vapier Exp $
depend() {
need net
use dns logger
after ntp-client
}
checkconfig() {
if [ ! -f /etc/ntp.conf ] ; then
eerror "Please create /etc/ntp.conf"
eerror "Sample conf: /usr/share/ntp/ntp.conf"
return 1
fi
return 0
}
start() {
checkconfig || return $?
ebegin "Starting ntpd"
touch /var/run/ntpd.pid
chown ntp:ntp /var/run/ntpd.pid
/usr/bin/ntpd -p /var/run/ntpd.pid ${NTPD_OPTS}
eend $? "Failed to start ntpd"
}
stop() {
ebegin "Stopping ntpd"
start-stop-daemon --stop --pidfile /var/run/ntpd.pid
eend $? "Failed to stop ntpd"
rm -f /var/run/ntpd.pid
}
|