mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-02 01:20:54 +00:00
3a73c3679f
- Sort pkg-plist - Bump PORTREVISION PR: 58585 Submitted by: maintainer Approved by: krion (implicit)
32 lines
623 B
Bash
32 lines
623 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PATH=/bin:/usr/bin:/usr/sbin
|
|
|
|
case $2 in
|
|
|
|
PRE-INSTALL)
|
|
echo "---> Starting pre-install script:"
|
|
|
|
if pw showgroup "%%GROUP%%" 2>/dev/null; then
|
|
echo "---> Using existing group \"%%GROUP%%\""
|
|
else
|
|
echo "---> Adding group \"%%GROUP%%\""
|
|
pw addgroup %%GROUP%% -h - || exit 1
|
|
fi
|
|
|
|
# Create user if required
|
|
if pw showuser "%%USER%%" 2>/dev/null; then
|
|
echo "---> Using existing user \"%%USER%%\""
|
|
else
|
|
echo "---> Adding user \"%%USER%%\""
|
|
pw adduser %%USER%% -g %%GROUP%% -h - \
|
|
-d "/nonexistent" -s "/sbin/nologin" -c "daapd User" || exit 1
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|