aboutsummaryrefslogtreecommitdiffstats
path: root/net-im/jabber/pkg-install
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/jabber/pkg-install')
-rw-r--r--net-im/jabber/pkg-install68
1 files changed, 0 insertions, 68 deletions
diff --git a/net-im/jabber/pkg-install b/net-im/jabber/pkg-install
deleted file mode 100644
index 1d8a161cc6b9..000000000000
--- a/net-im/jabber/pkg-install
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "POST-INSTALL" ]; then
- exit 0
-fi
-
-USER=jabber
-GROUP=${USER}
-UID=93
-GID=${UID}
-ETCDIR=${PREFIX:-$PKG_PREFIX}/etc
-LOGDIR="/var/log/jabberd"
-PIDDIR="/var/run/jabberd"
-SPOOLDIR="/var/spool/jabberd"
-
-if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
- if pw groupadd ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
-fi
-
-if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
- if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
- -s "/sbin/nologin" -d "/nonexistent" \
- -c "Jabber Daemon"; \
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
-fi
-
-if [ ! -f ${ETCDIR}/jabber.xml ]; then
- echo "Creating \"${ETCDIR}/jabber.xml\"."
- cp -p ${ETCDIR}/jabber.xml.dist ${ETCDIR}/jabber.xml
-fi
-
-echo "Fixing config files ownerships and modes."
-chown root:${GROUP} ${ETCDIR}/jabber.xml ${ETCDIR}/jabber.xml.dist
-chmod 640 ${ETCDIR}/jabber.xml ${ETCDIR}/jabber.xml.dist
-
-if [ ! -d ${LOGDIR} ]; then
- echo "Creating \"${LOGDIR}\"."
- mkdir -p ${LOGDIR}
-fi
-
-echo "Fixing ownerships and modes in \"${LOGDIR}\"."
-touch ${LOGDIR}/error.log ${LOGDIR}/record.log
-chown ${USER}:${GROUP} ${LOGDIR}/error.log ${LOGDIR}/record.log
-chmod 640 ${LOGDIR}/error.log ${LOGDIR}/record.log
-
-if [ ! -d ${PIDDIR} ]; then
- echo "Creating \"${PIDDIR}\"."
- mkdir -p ${PIDDIR}
-fi
-
-if [ ! -d ${SPOOLDIR} ]; then
- echo "Creating \"${SPOOLDIR}\"."
- mkdir -p ${SPOOLDIR}
-fi
-
-echo "Fixing ownerships and modes in \"${SPOOLDIR}\"."
-chown -R ${USER}:${GROUP} ${SPOOLDIR}
-chmod -R go= ${SPOOLDIR}