mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
ab42fbb1c7
harti suggest that you will be able to commit this port update to ports colllection? Submtited by: Meno Abels <meno.abels@adviser.com>
33 lines
711 B
Bash
33 lines
711 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD: /tmp/pcvs/ports/audio/mt-daapd/Attic/pkg-install,v 1.1 2004-08-05 23:00:09 edwin Exp $
|
|
#
|
|
|
|
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
|