diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2009-03-31 12:06:52 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2009-03-31 12:06:52 +0000 |
commit | 0ef12d48dbd4e2f1a03cd6c7f0f1504587f71807 (patch) | |
tree | 57a1e710dea1a2481945b4e1abe06ff5d669dec3 /testing/gross-svn | |
parent | 53daaab1e0f7bcb8de3936bfb2771e6a969135a4 (diff) | |
download | aports-0ef12d48dbd4e2f1a03cd6c7f0f1504587f71807.tar.bz2 aports-0ef12d48dbd4e2f1a03cd6c7f0f1504587f71807.tar.xz |
testing/gross-svn: run as user gross
Diffstat (limited to 'testing/gross-svn')
-rw-r--r-- | testing/gross-svn/APKBUILD | 16 | ||||
-rw-r--r-- | testing/gross-svn/gross-svn.confd | 2 | ||||
-rw-r--r-- | testing/gross-svn/gross-svn.initd | 36 |
3 files changed, 30 insertions, 24 deletions
diff --git a/testing/gross-svn/APKBUILD b/testing/gross-svn/APKBUILD index ef00280986..5c1b32d1da 100644 --- a/testing/gross-svn/APKBUILD +++ b/testing/gross-svn/APKBUILD @@ -2,16 +2,18 @@ # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=gross-svn pkgver=511 -pkgrel=0 +pkgrel=1 pkgdesc="Greylisting of suspicious sources" url="http://code.google.com/p/gross/" license="BSD" -depends="" +depends="uclibc" makedepends="c-ares" +install="$pkgname.post-install $pkgname.pre-install" subpackages="$pkgname-doc $pkgname-dev" source="http://alpine.nethq.org/clandmeter/src/${pkgname}-${pkgver}.tar.bz2 $pkgname.initd -$pkgname.confd" +$pkgname.confd +$install" build() { cd "$srcdir/$pkgname-$pkgver" @@ -23,11 +25,13 @@ build() { make || return 1 make -j1 DESTDIR="$pkgdir" install - install -dD -onobody -gnobody "$pkgdir"/var/run/grossd + install -dD "$pkgdir"/var/run/gross install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/gross install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/gross } md5sums="f2488ced5b47f359c3a1127d9ba3453c gross-svn-511.tar.bz2 -c5fbd3396e901c5e35e3961deb0b36b6 gross-svn.initd -b95f2fba652bc93022ad87cffd096f84 gross-svn.confd" +f553899b62bea50c25baf6f88afe69af gross-svn.initd +5ca1c6e51c3243236e6564480b20279b gross-svn.confd +4b55d1c5534167946cc11376d1b05c34 gross-svn.post-install +8f6e45b98888dbb9971f7681bf431f6f gross-svn.pre-install" diff --git a/testing/gross-svn/gross-svn.confd b/testing/gross-svn/gross-svn.confd index bb52e1f194..646e12f9d7 100644 --- a/testing/gross-svn/gross-svn.confd +++ b/testing/gross-svn/gross-svn.confd @@ -3,6 +3,4 @@ # OPTS="" -USER="nobody" -GROUP="nobody" diff --git a/testing/gross-svn/gross-svn.initd b/testing/gross-svn/gross-svn.initd index 677d44997f..c67293e17f 100644 --- a/testing/gross-svn/gross-svn.initd +++ b/testing/gross-svn/gross-svn.initd @@ -1,31 +1,35 @@ #!/sbin/runscript -NAME=grossd -DAEMON=/usr/sbin/$NAME +NAME="grossd" +DAEMON="/usr/sbin/$NAME" +USER="gross" +GROUP="gross" depend() { - need net + need net } check_config() { - if [ ! -e /var/db/gross/ ] ; then - einfo "Generating Gross database..." - install -dD -o${USER} -g${GROUP} /var/db/gross - ${DAEMON} -Cf /etc/grossd.conf > /dev/null - fi + if [ ! -f /var/db/gross/state ] ; then + einfo "Generating Gross database..." + install -dD -o${USER} -g${GROUP} /var/db/gross + ${DAEMON} -Cu ${USER} > /dev/null + fi } start() { - check_config || return 1 - ebegin "Starting ${NAME}" - start-stop-daemon --start --quiet --background \ - --exec ${DAEMON} -- ${OPTS} - eend $? + check_config || return 1 + ebegin "Starting ${NAME}" + start-stop-daemon --start --quiet --background \ + --exec ${DAEMON} -- \ + -p /var/run/gross/grossd.pid \ + -u ${USER} ${OPTS} + eend $? } stop() { - ebegin "Stopping ${NAME}" - start-stop-daemon --stop --pidfile /var/run/grossd/grossd.pid - eend $? + ebegin "Stopping ${NAME}" + start-stop-daemon --stop --pidfile /var/run/gross/grossd.pid + eend $? } |