mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
1b62e28fc9
Mailman is software to help manage email discussion lists, much like Majordomo and Smartmail. Unlike most similar products, Mailman gives each mailing list a web page, and allows users to subscribe, unsubscribe, etc. over the web. Even the list manager can administer his or her list entirely from the web. Mailman also integrates most things people want to do with mailing lists, including archiving, mail-to-news gateways, integrated bounce handling, spam prevention, email-based admin commands, direct SMTP delivery (with fast bulk mailing), support for virtual domains, and more. PR: 19400 Submitted by: Nick Hibma <n_hibma@calcaphon.com>
36 lines
715 B
Bash
36 lines
715 B
Bash
#!/bin/sh
|
|
|
|
USER=$1
|
|
UID=$2
|
|
GROUP=${USER}
|
|
GID=${UID}
|
|
|
|
if [ -z "$USER" -o -z "$UID" ]; then
|
|
echo "Syntax: $0 <username> <uid>"
|
|
exit 1
|
|
fi
|
|
|
|
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 ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon"
|
|
then
|
|
echo "Added user \"${USER}\"."
|
|
else
|
|
echo "Adding user \"${USER}\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|