diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-06-18 14:09:42 +0200 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-06-18 14:09:42 +0200 |
commit | 0982af0e4b5622aaae02f43925fe1152006f878e (patch) | |
tree | 38f7971d08e822fa0a4ffcb5e432b7da993da497 /community/uptimed | |
parent | 38389505b5f8809743855ead04f7feb9a37a9cc8 (diff) | |
parent | 014b5d0a1ee98ba0466f067f605b9637f2a14b2f (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community/nautilus-actions/PKGBUILD
extra/libdrm/PKGBUILD
extra/mesa/PKGBUILD
extra/perl-dbd-mysql/PKGBUILD
multilib/lib32-freetype2/PKGBUILD
multilib/lib32-krb5/PKGBUILD
multilib/lib32-libdrm/PKGBUILD
multilib/lib32-libdrm/no-pthread-stubs.patch
multilib/lib32-libpng/PKGBUILD
multilib/lib32-mesa/PKGBUILD
multilib/lib32-pango/PKGBUILD
testing/bind/PKGBUILD
testing/dmraid/PKGBUILD
testing/glibc/PKGBUILD
Diffstat (limited to 'community/uptimed')
-rw-r--r-- | community/uptimed/PKGBUILD | 15 | ||||
-rw-r--r-- | community/uptimed/rc.d | 39 |
2 files changed, 47 insertions, 7 deletions
diff --git a/community/uptimed/PKGBUILD b/community/uptimed/PKGBUILD index feaff9e0f..0720c515f 100644 --- a/community/uptimed/PKGBUILD +++ b/community/uptimed/PKGBUILD @@ -1,11 +1,12 @@ -# $Id: PKGBUILD 65353 2012-02-21 02:18:04Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# $Id: PKGBUILD 72514 2012-06-16 08:04:35Z bpiotrowski $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> # Contributor: Tom Killian <tomk@runbox.com> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> pkgname=uptimed -pkgver=0.3.16 -pkgrel=4 +pkgver=0.3.17 +pkgrel=1 pkgdesc="A system uptime record daemon" arch=(i686 x86_64 'mips64el') url="http://podgorny.cz/uptimed/" @@ -15,8 +16,8 @@ backup=(etc/uptimed.conf) options=('!libtool') install=$pkgname.install source=(http://podgorny.cz/$pkgname/releases/$pkgname-$pkgver.tar.bz2 - uptimed) -md5sums=('f87ec2cc39039239004afa542cf99c59' + rc.d) +md5sums=('528b62c33454b33537c3bf2366977bdb' '4ae90bee9fc78014a889a5072effb735') build() { @@ -40,5 +41,5 @@ package() { make prefix=$pkgdir/usr sysconfdir=$pkgdir/etc install mv $pkgdir/etc/uptimed.conf-dist $pkgdir/etc/uptimed.conf - install -D $srcdir/uptimed $pkgdir/etc/rc.d/uptimed + install -D $srcdir/rc.d $pkgdir/etc/rc.d/uptimed } diff --git a/community/uptimed/rc.d b/community/uptimed/rc.d new file mode 100644 index 000000000..6fe9ec3e3 --- /dev/null +++ b/community/uptimed/rc.d @@ -0,0 +1,39 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/uptimed` +case "$1" in + start) + stat_busy "Starting Uptimed Daemon" + [ -z "$PID" ] && /usr/sbin/uptimed -b # create the boot record + if [ $? -gt 0 ] ; then + stat_fail + else + add_daemon uptimed # create the 'state' dir + /usr/sbin/uptimed # fire up the daemon + if [ $? -gt 0 ]; then + stat_fail + fi + stat_done + fi + ;; + stop) + stat_busy "Stopping Uptimed Daemon" + [ "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon uptimed # remove the 'state' dir + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |