diff options
author | Valery Kartel <valery.kartel@gmail.com> | 2017-04-24 15:58:55 +0300 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-06-02 08:06:39 +0000 |
commit | 89b858eff5467d9201b52bf87727bc947f07c323 (patch) | |
tree | ea90ffb52cb4539398daa14a14b6e0cff114793a /main/openntpd/openntpd.initd | |
parent | 2275192021130da8e3bed22be2cd653ce9793a47 (diff) | |
download | aports-89b858eff5467d9201b52bf87727bc947f07c323.tar.bz2 aports-89b858eff5467d9201b52bf87727bc947f07c323.tar.xz |
main/openntpd: remove legacy stuff, cleanups
cleanups in APKBUILD
remove legacy rc-scripts renaming
remove legacy ntp-user checks and creation.
make init-script like in opensmtpd
Diffstat (limited to 'main/openntpd/openntpd.initd')
-rw-r--r-- | main/openntpd/openntpd.initd | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/main/openntpd/openntpd.initd b/main/openntpd/openntpd.initd index e29beda628..dc9a9ae2bb 100644 --- a/main/openntpd/openntpd.initd +++ b/main/openntpd/openntpd.initd @@ -1,41 +1,14 @@ #!/sbin/openrc-run -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.rc,v 1.7 2008/10/10 09:40:10 bangert Exp $ + +name="NTP Server" +command=/usr/sbin/ntpd +command_args="-d $NTPD_OPTS" +command_background=yes +pidfile=/run/$RC_SVCNAME.pid +required_files=/etc/ntpd.conf depend() { need net provide ntp-client use dns logger } - -checkconfig() { - if [ ! -f /etc/ntpd.conf ] ; then - eerror "Could not find /etc/ntpd.conf!" - return 1 - fi - - if [ -x /usr/bin/getent ] ; then - if [ "`getent passwd ntp | cut -d: -f 6`" != "${NTPD_HOME}" ] ; then - eerror "Home directory of ntp needs to be ${NTPD_HOME}" - eerror "Please run 'usermod -d ${NTPD_HOME} ntp'" - return 1 - fi - fi - - return 0 -} - -start() { - checkconfig || return $? - - ebegin "Starting ntpd" - start-stop-daemon --start --exec /usr/sbin/ntpd --name ntpd -- ${NTPD_OPTS} - eend $? "Failed to start ntpd" -} - -stop() { - ebegin "Stopping ntpd" - start-stop-daemon --stop --exec /usr/sbin/ntpd --name ntpd --user root - eend $? "Failed to stop openntpd" -} |