mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-02 01:20:54 +00:00
53c8689b12
Noticed by: Seth Kingsley <sethk@meowfishies.com>
29 lines
583 B
Bash
29 lines
583 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# $1 = package name
|
|
if [ "$2" != "PRE-INSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
USER=interch
|
|
GROUP=${USER}
|
|
UID=95
|
|
GID=${UID}
|
|
|
|
pw groupshow ${GROUP} >/dev/null 2>&1 \
|
|
|| (pw groupadd ${GROUP} -g ${GID} \
|
|
|| (echo "Adding group '${GROUP}' failed!"; exit 1) \
|
|
&& echo "Added group '${GROUP}'.")
|
|
|
|
pw usershow ${USER} >/dev/null 2>&1 \
|
|
|| (pw useradd ${USER} -h - -u ${UID} -g ${GROUP} \
|
|
-c "Interchange user" -d "${PKG_PREFIX}/interchange" \
|
|
-s "/sbin/nologin" \
|
|
|| (echo "Adding user '${USER}' failed!"; exit 1) \
|
|
&& echo "Added user '${USER}'.")
|
|
|
|
exit 0
|