diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-04-08 08:31:45 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-04-08 08:32:45 +0300 |
commit | 7fca49bbfd71e36912fe33249c9d9054812c33d8 (patch) | |
tree | 6693750e798bc34157e0f795b7e55213f63d7d1c /testing | |
parent | e5ef757a27fee3a24dcdb985032f4477f2642bfb (diff) | |
download | aports-7fca49bbfd71e36912fe33249c9d9054812c33d8.tar.bz2 aports-7fca49bbfd71e36912fe33249c9d9054812c33d8.tar.xz |
testing/lsyncd: fix init.d
* default to root user (we are backing up files and need to open
all of the files regardless of permissions)
* use pidfile
* depend on rsync as it's almost always required
Diffstat (limited to 'testing')
-rw-r--r-- | testing/lsyncd/APKBUILD | 6 | ||||
-rw-r--r-- | testing/lsyncd/lsyncd.initd | 32 |
2 files changed, 22 insertions, 16 deletions
diff --git a/testing/lsyncd/APKBUILD b/testing/lsyncd/APKBUILD index 7e79dbbc6d..14225e2a69 100644 --- a/testing/lsyncd/APKBUILD +++ b/testing/lsyncd/APKBUILD @@ -2,12 +2,12 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lsyncd pkgver=2.0.4 -pkgrel=1 +pkgrel=2 pkgdesc="Live Syncing (Mirror) Daemon" url="http://code.google.com/p/lsyncd/" arch="all" license="GPLv2+" -depends= +depends="rsync" depends_dev= makedepends="$depends_dev lua-dev" install="" @@ -49,4 +49,4 @@ package() { } md5sums="0b4557dd3d87a02ae0cbd7b5fc16cd0c lsyncd-2.0.4.tar.gz -95ca2fe43eb6be8d1f58d5239d4df6a5 lsyncd.initd" +1224bbf02c2de6144b63cc5f3decfbf0 lsyncd.initd" diff --git a/testing/lsyncd/lsyncd.initd b/testing/lsyncd/lsyncd.initd index 9dfddd405d..5578b1a2af 100644 --- a/testing/lsyncd/lsyncd.initd +++ b/testing/lsyncd/lsyncd.initd @@ -2,25 +2,31 @@ NAME=lsyncd DAEMON=/usr/bin/$NAME -USER=daemon -CONF=/etc/lsyncd/lrsync.lua +PIDFILE=/var/run/$NAME.pid +USER=root +GROUP=root +CONF=/etc/lsyncd/lsyncd.lua depend() { - need net + need net } start() { - ebegin "Starting $NAME" - start-stop-daemon --start --quiet \ - --user $USER \ - --exec $DAEMON -- \ - $CONF - eend $? + touch "$PIDFILE" + chown $USER:$GROUP "$PIDFILE" + ebegin "Starting $NAME" + start-stop-daemon --start --quiet \ + --pidfile "$PIDFILE" \ + --user "$USER" --group "$GROUP" \ + --chdir /etc/lsyncd \ + --exec "$DAEMON" -- \ + "$CONF" -pidfile "$PIDFILE" + eend $? } stop() { - ebegin "Stopping $NAME" - start-stop-daemon --stop --quiet \ - --exec $DAEMON - eend $? + ebegin "Stopping $NAME" + start-stop-daemon --stop --quiet \ + --pidfile "$PIDFILE" + eend $? } |