summaryrefslogtreecommitdiff
path: root/net-mgmt/nagios2/files/pkg-deinstall.in
blob: 6b20aa9bc962129a4af91aa24b9a92ebcfacb81e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# $FreeBSD$
#

NAGIOSDIR=%%NAGIOSDIR%%
NAGIOSUSER=%%NAGIOSUSER%%
NAGIOSGROUP=%%NAGIOSGROUP%%

if [ "$2" = "POST-DEINSTALL" ]; then
  if /usr/sbin/pw group show "${NAGIOSGROUP}" 2>&1 >/dev/null; then
    echo "You should manually remove the \"${NAGIOSGROUP}\" group."
  fi

  if /usr/sbin/pw user show "${NAGIOSUSER}" 2>&1 >/dev/null; then
    echo "You should manually remove the \"${NAGIOSUSER}\" user."
  fi

  if [ -e "${NAGIOSDIR}" ]; then
    echo "You should manually remove the \"${NAGIOSDIR}\" directory."
  fi
fi