Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37516194
en ru br
ALT Linux repos
S:3.9p1-alt15
5.0: 3.9p1-alt10
4.1: 3.9p1-alt8
4.0: 3.9p1-alt8
3.0:
+backports:3.9p1-alt0.M30.1

Group :: Networking/Other
RPM: openntpd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#! /bin/bash
#
# ntpd Time synchronization daemon
#
# chkconfig: - 90 60
# description: ntpd is a time synchronization daemon
# processname: ntpd
# config: /etc/ntpd.conf
# pidfile: /var/run/ntpd.pid

# Source function library.
WITHOUT_RC_COMPAT=1
. /etc/init.d/functions

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

# Source ntpd configuration.
NTPD_ARGS=
SourceIfNotEmpty /etc/sysconfig/ntpd
NTPD_USER=ntpd

LOCKFILE=/var/lock/subsys/ntpd
RETVAL=0

start()
{
is_yes "$NETWORKING" || return 0
start_daemon --lockfile "$LOCKFILE" --expect-user "$NTPD_USER" -- ntpd $NTPD_ARGS
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --lockfile "$LOCKFILE" --expect-user "$NTPD_USER" -- ntpd
RETVAL=$?
return $RETVAL
}

ntp_status()
{
status --lockfile "$LOCKFILE" --expect-user "$NTPD_USER" -- ntpd
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
status)
ntp_status
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condreload|condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|status|condstop|condreload|condrestart}"
RETVAL=1
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin