blob: 857d89c07fed46a7ee368008ae31025e86cfe4da (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/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
|