1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
freebsd-ports/irc/ircproxy/pkg-install
Beech Rintoul cd8375131c - Update to 1.3.1b
Submitted by:	Jonas Kvinge <jonas@emptyglass.night-light.net>	(maintainer)
Approved by:	linimon (mentor)
2007-12-18 08:22:10 +00:00

45 lines
1.1 KiB
Bash

#!/bin/sh
#
# Night Light IRC Proxy
# Installation script for FreeBSD ports
# Written by Jonas Kvinge
#
# Last modified: Jonas Kvinge (03.09.2006)
#
BINFILE="ircproxyd"
PIDFILE="/var/run/ircproxyd.pid"
EUSER="ircproxy"
EGROUP="ircproxy"
UID="118"
GID="118"
if [ "$2" = "POST-INSTALL" ]; then
pw group show ${EGROUP} >/dev/null 2>&1
if [ ! $? -eq 0 ]; then
pw groupadd ${EGROUP} -g ${GID}
fi
pw user show ${EUSER} >/dev/null 2>&1
if [ ! $? -eq 0 ]; then
pw useradd ${EUSER} -u ${UID} -g ${EGROUP} -s /nonexistent -c "Night Light IRC Proxy"
fi
#sed -i -e "s:^IRCPROXYBINFILE=.*:IRCPROXYBINFILE=${PKG_PREFIX}/sbin/${BINFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1
#sed -i -e "s:^IRCPROXYPIDFILE=.*:IRCPROXYPIDFILE=${PIDFILE}:" ${PKG_PREFIX}/sbin/ircproxy.sh || exit 1
#rm -f ${PKG_PREFIX}/sbin/ircproxy.sh-e
#grep -q "^[^#]*${PKG_PREFIX}/sbin/ircproxy\.sh" /etc/crontab >/dev/null 2>&1
#if [ ! $? -eq 0 ] ; then
# cat <<EOF >>/etc/crontab || exit 1
#*/5 * * * * root $PKG_PREFIX/sbin/ircproxy.sh
#EOF
#fi
fi
exit 0