aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nagios2
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-04-07 14:25:48 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-04-07 14:25:48 +0000
commit4c6bb718029c140af75c5fba0e42fa5f50ba029c (patch)
tree77be80bb06fcd461e12b61c202415827c478b571 /net-mgmt/nagios2
parentab669e88f6732c378c63e3e24b3c76cb5a362c31 (diff)
downloadports-4c6bb718029c140af75c5fba0e42fa5f50ba029c.tar.gz
ports-4c6bb718029c140af75c5fba0e42fa5f50ba029c.zip
Notes
Diffstat (limited to 'net-mgmt/nagios2')
-rw-r--r--net-mgmt/nagios2/Makefile6
-rw-r--r--net-mgmt/nagios2/files/pkg-install.in9
2 files changed, 13 insertions, 2 deletions
diff --git a/net-mgmt/nagios2/Makefile b/net-mgmt/nagios2/Makefile
index e9b8a11098c8..d7b26cbe1643 100644
--- a/net-mgmt/nagios2/Makefile
+++ b/net-mgmt/nagios2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= nagios
PORTVERSION= 2.8
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagios
@@ -32,6 +33,9 @@ NAGIOSUSER?= nagios
NAGIOSGROUP?= nagios
NAGIOSDIR?= /var/spool/nagios
+NAGIOSUID= 181
+NAGIOSGID= ${NAGIOSUID}
+
NAGIOSWWWDIR?= www/nagios
NAGIOSHTMURL?= /nagios
NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin
@@ -74,6 +78,8 @@ PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
NAGIOSWWWDIR=${NAGIOSWWWDIR} \
NAGIOSUSER=${NAGIOSUSER} \
NAGIOSGROUP=${NAGIOSGROUP} \
+ NAGIOSUID=${NAGIOSUID} \
+ NAGIOSGID=${NAGIOSGID} \
NAGIOSHTMURL=${NAGIOSHTMURL} \
NAGIOSCGIURL=${NAGIOSCGIURL} \
WWWGRP=${WWWGRP}
diff --git a/net-mgmt/nagios2/files/pkg-install.in b/net-mgmt/nagios2/files/pkg-install.in
index 2575727530e0..f670f79b45ff 100644
--- a/net-mgmt/nagios2/files/pkg-install.in
+++ b/net-mgmt/nagios2/files/pkg-install.in
@@ -6,6 +6,8 @@
NAGIOSDIR=%%NAGIOSDIR%%
NAGIOSUSER=%%NAGIOSUSER%%
NAGIOSGROUP=%%NAGIOSGROUP%%
+NAGIOSUID=%%NAGIOSUID%%
+NAGIOSGID=%%NAGIOSGID%%
ask() {
local question default answer
@@ -46,7 +48,8 @@ if [ "$2" = "PRE-INSTALL" ]; then
else
echo "You need a \"${NAGIOSGROUP}\" group."
if yesno "Would you like me to create it" "YES"; then
- /usr/sbin/pw groupadd "${NAGIOSGROUP}" -h - || exit
+ /usr/sbin/pw groupadd "${NAGIOSGROUP}" -g "${NAGIOSGID}" -h - || \
+ /usr/sbin/pw groupadd "${NAGIOSGROUP}" -h - || exit
echo "Done."
else
echo "Please create the \"${NAGIOSGROUP}\" group manually and try again."
@@ -59,7 +62,9 @@ if [ "$2" = "PRE-INSTALL" ]; then
else
echo "You need a \"${NAGIOSUSER}\" user."
if yesno "Would you like me to create it" "YES"; then
- /usr/sbin/pw useradd "${NAGIOSUSER}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
+ /usr/sbin/pw useradd "${NAGIOSUSER}" -u "${NAGIOSUID}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
+ -s /sbin/nologin -c "Nagios pseudo-user" || \
+ /usr/sbin/pw useradd "${NAGIOSUSER}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
-s /sbin/nologin -c "Nagios pseudo-user" || exit
else
echo "Please create the \"${NAGIOSUSER}\" user manually and try again."