blob: c28057b03d4ee853dcca9c6d4681132a671abe51 (
plain) (
tree)
|
|
#!/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
|