304acfbef8
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
36 lines
714 B
Bash
36 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
|