diff options
author | root <root@rshg054.dnsready.net> | 2011-08-25 23:14:43 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-25 23:14:43 +0000 |
commit | 9621cbabd4788b98dfdee59d784c4b4b58384c6b (patch) | |
tree | 8dbd549f0f81a825febf0db7fbf641db995459be /community/chrony | |
parent | f53c212680c1817ef2337855ef8814dea6b07e4e (diff) |
Thu Aug 25 23:14:43 UTC 2011
Diffstat (limited to 'community/chrony')
-rw-r--r-- | community/chrony/PKGBUILD | 30 | ||||
-rwxr-xr-x | community/chrony/chrony | 37 |
2 files changed, 67 insertions, 0 deletions
diff --git a/community/chrony/PKGBUILD b/community/chrony/PKGBUILD new file mode 100644 index 000000000..dd6d1d9ec --- /dev/null +++ b/community/chrony/PKGBUILD @@ -0,0 +1,30 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Patrick Leslie Polzer <leslie.polzer@gmx.net> +# Contributor: cdhotfire <cdhotfire@gmail.com> +# Contributor: Shinlun Hsieh <yngwiexx@yahoo.com.tw> +# Maintainer: Elisamuel Resto <ryuji@simplysam.us> + +pkgname=chrony +pkgver=1.26 +pkgrel=1 +pkgdesc="Dial-up friendly NTP daemon and excellent replacement for NTP on desktop systems" +arch=('i686' 'x86_64') +url="http://chrony.tuxfamily.org/" +options=('strip') +license=('GPL') +depends=('readline' 'libcap') +backup=('etc/chrony.conf') +source=("http://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz" \ + 'chrony') +md5sums=('ad6dd619ff1986e4ff780363c64e2246' + 'd8b653c8bcc76cef00aa10fbd3eeb4f7') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr + make + make DESTDIR=$pkgdir install + install -D -m0644 $srcdir/$pkgname-$pkgver/examples/chrony.conf.example $pkgdir/etc/chrony.conf + install -D -m0755 $srcdir/chrony $pkgdir/etc/rc.d/chrony +} diff --git a/community/chrony/chrony b/community/chrony/chrony new file mode 100755 index 000000000..ec042d798 --- /dev/null +++ b/community/chrony/chrony @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/chronyd` +case "$1" in + start) + stat_busy "Starting chrony Daemon" + if [ -z "$PID" ]; then + /usr/sbin/chronyd $NTPD_ARGS & + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + add_daemon chrony + stat_done + fi + ;; + stop) + stat_busy "Stopping chrony Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon chrony + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac |