ports/53482: New Port: zabbix - Very advanced network monitoring system
Sergey Akifyev
asa at gascom.ru
Thu Jun 19 10:11:10 UTC 2003
On Thu, 2003-06-19 at 12:10, FreeBSD-gnats-submit at FreeBSD.org wrote:
Shit happens! Forgot to archive pkg-install script :)
#!/bin/sh
# Script was taken from mysql323-server port, and modified
# to suit zabbix needs
PATH=/bin:/usr/sbin
case $2 in
POST-INSTALL)
USER=zabbix
GROUP=${USER}
UID=111
GID=${UID}
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."
if pw usermod ${USER} -d /nonexistent
then
echo "Changed home directory of \"${USER}\" to /nonexistent"
else
echo "Changing home directory of \"${USER}\" to /nonexistent
failed..."
exit 1
fi
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
esac
--
regards,
Sergey Akifyev <asa at gascom.ru>
JSC Gascom <http://www.gascom.ru>
PGP key available from:
ftp://ftp.gascom.ru/pub/PGP-keys/asa.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs/attachments/20030619/a3cd9f05/attachment.sig>
More information about the freebsd-ports-bugs
mailing list