mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
87a76f2e41
"LDMud started as a project to clean up and modernize Amylaar's LPMud gamedriver. Primary goals are full documentation, a commented source body and out-of-the-box support for the major mudlibs, of which the commented source body has been pretty much completed. During the course of work a lot of bug fixes and improvements found their way into the driver - much more than originally expected, and definitely enough to make LDMud a driver in its own right."
38 lines
683 B
Bash
38 lines
683 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
if [ "$2" = "PRE-INSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
|
|
|
USER=mud
|
|
GROUP=${USER}
|
|
UID=97
|
|
GID=${UID}
|
|
|
|
if pw groupshow "${GROUP}" 2>/dev/null; then
|
|
echo "Using existing group \"${GROUP}\"."
|
|
else
|
|
if pw groupadd "${GROUP}" -g ${GID}; then
|
|
echo "Added group \"${GROUP}\"."
|
|
else
|
|
echo "Adding group \"${GROUP}\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if pw usershow "${USER}" 2>/dev/null; then
|
|
echo "Using existing user \"${USER}\"."
|
|
else
|
|
if pw useradd "${USER}" -u ${UID} -g "${GROUP}" -h - \
|
|
-s "/bin/sh" -d "/nonexistent" -c "MUD Owner"
|
|
then
|
|
echo "Added user \"${USER}\"."
|
|
else
|
|
echo "Adding user \"${USER}\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|