aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/cacti/files/pkg-install.in
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/cacti/files/pkg-install.in')
-rw-r--r--net-mgmt/cacti/files/pkg-install.in50
1 files changed, 0 insertions, 50 deletions
diff --git a/net-mgmt/cacti/files/pkg-install.in b/net-mgmt/cacti/files/pkg-install.in
deleted file mode 100644
index e33cc5c0bcb9..000000000000
--- a/net-mgmt/cacti/files/pkg-install.in
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-PW=/usr/sbin/pw
-UID=107
-GID=${UID}
-CACTIUSER=%%CACTIUSER%%
-CACTIGROUP=%%CACTIGROUP%%
-CACTIDIR=%%CACTIDIR%%
-PREFIX=%%PREFIX%%
-
-case $2 in
-
-PRE-INSTALL)
-
- if ${PW} group show "${CACTIGROUP}" 2>/dev/null; then
- echo "You already have a group \"${CACTIGROUP}\", so I will use it."
- else
- if ${PW} groupadd ${CACTIGROUP} -g ${GID}; then
- echo "Added group \"${CACTIGROUP}\"."
- else
- echo "Adding group \"${CACTIGROUP}\" failed..."
- exit 1
- fi
- fi
-
- if ${PW} user show "${CACTIUSER}" 2>/dev/null; then
- echo "You already have a user \"${CACTIUSER}\", so I will use it."
- else
- if ${PW} useradd ${CACTIUSER} -u ${UID} -g ${CACTIGROUP} -h - \
- -d "/nonexistent" -s /sbin/nologin -c "Cacti Sandbox"
- then
- echo "Added user \"${CACTIUSER}\"."
- else
- echo "Adding user \"${CACTIUSER}\" failed..."
- exit 1
- fi
- fi
- ;;
-
-POST-INSTALL)
-
- chown ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/rra/
- chown -R ${CACTIUSER}:${CACTIGROUP} ${PREFIX}/${CACTIDIR}/log/
- chmod -R a+r ${PREFIX}/${CACTIDIR}/scripts/
- ;;
-*)
- exit 1
-;;
-esac
-exit