1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00
freebsd-ports/net/relayd/pkg-install
Jun Kuriyama 304acfbef8 OpenBSD's Relay Daemon (previously known as hoststated).
relayd is a daemon to relay and dynamically redirect incoming
connections to a target host. Its main purposes are to run as a
load-balancer, application layer gateway, or transparent proxy. The
daemon is able to monitor groups of hosts for availability, which is
determined by checking for a specific service common to a host group.

WWW: http://spootnik.org/relayd/

# This port will work on $OSVERSION >= 700049.
# If you want to use on RELENG_6, apply a patch in
# http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/pf_table.c.diff?r1=1.67&r2=1.68
2008-01-20 21:38:26 +00:00

37 lines
714 B
Bash

#!/bin/sh
#
# $FreeBSD$
case $2 in
PRE-INSTALL)
USER=${RUSER}
GROUP=${RGROUP}
UID=913
GID=913
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d /var/empty -c "Relay Daemon" -s /usr/sbin/nologin
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
;;
esac