freebsd-ports/audio/mt-daapd/pkg-install
Edwin Groothuis ab42fbb1c7 Fwd: mt-daapd patch
harti suggest that you will be able to commit this port
	update to ports colllection?

Submtited by:	Meno Abels <meno.abels@adviser.com>
2004-08-05 23:00:10 +00:00

32 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