mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-18 03:46:03 +00:00
cd8375131c
Submitted by: Jonas Kvinge <jonas@emptyglass.night-light.net> (maintainer) Approved by: linimon (mentor)
45 lines
1.1 KiB
Bash
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
|
|
|