mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-18 03:46:03 +00:00
eea0eeac2e
- Make sure nagios user/group is created when installing from ports - Pass maintainership to submitter PR: ports/107175 Submitted by: Dan Langille <dan at langille.org>
20 lines
407 B
Bash
20 lines
407 B
Bash
#!/bin/sh
|
|
|
|
PATH=/bin:/usr/bin:/usr/sbin
|
|
TMPFILE=/tmp/services-$RANDOM-$$
|
|
|
|
|
|
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
|
|
|
|
case "$2" in
|
|
"DEINSTALL")
|
|
# Note how to delete UID/GID
|
|
USER=nagios
|
|
GROUP=nagios
|
|
if pw usershow "${USER}" 2>/dev/null 1>&2; then
|
|
echo "To delete nagios user permanently, use 'pw userdel ${USER}'"
|
|
echo "To delete nagios group permanently, use 'pw groupdel ${GROUP}'"
|
|
fi
|
|
;;
|
|
esac
|