aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-08-16 16:21:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-08-16 16:21:35 +0000
commit4653e1fb3db3b0c6132ffdb56880443f1915786f (patch)
tree6c3ddb502c81a6652138427007b1db47959f37da
parentc3ca0dddf1bdf17d5453f130f791b67f2e80fba4 (diff)
downloadaports-4653e1fb3db3b0c6132ffdb56880443f1915786f.tar.bz2
aports-4653e1fb3db3b0c6132ffdb56880443f1915786f.tar.xz
main/nagios: use user 'nagios' instead of 'nobody'
fixes #375
-rw-r--r--main/nagios/APKBUILD9
-rw-r--r--main/nagios/nagios.pre-install4
2 files changed, 10 insertions, 3 deletions
diff --git a/main/nagios/APKBUILD b/main/nagios/APKBUILD
index 37ac05db46..70358ecbce 100644
--- a/main/nagios/APKBUILD
+++ b/main/nagios/APKBUILD
@@ -2,17 +2,20 @@
# Maintainer: Carlo Landmeter <clandmeter at gmail>
pkgname=nagios
pkgver=3.2.1
-pkgrel=1
+pkgrel=2
pkgdesc="Popular monitoring tool"
url="http://www.nagios.org/"
license="GPL-2"
depends="perl"
+install="$pkgname.pre-install"
makedepends="gd-dev pkgconfig perl-dev"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
nagios.confd
nagios.initd
lighttpd-nagios.conf"
subpackages="${pkgname}-web"
+pkgusers="nagios"
+pkggroups="nagios"
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -28,8 +31,8 @@ build() {
--datadir=/usr/share/nagios/htdocs \
--libexecdir=/usr/lib/nagios/plugins \
--localstatedir=/var/nagios \
- --with-nagios-user=nobody \
- --with-nagios-group=nobody \
+ --with-nagios-user=nagios \
+ --with-nagios-group=nagios \
--enable-embedded-perl \
--with-perlcache
make all || return 1
diff --git a/main/nagios/nagios.pre-install b/main/nagios/nagios.pre-install
new file mode 100644
index 0000000000..0e036c6a44
--- /dev/null
+++ b/main/nagios/nagios.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+adduser -S -H -h /var/nagios -s /bin/false -D nagios 2>/dev/null
+exit 0