freebsd-ports/audio/mt-daapd/files/pkg-install.in
Ion-Mihai Tetcu b817e22842 - Update to 0.2.4
- convert to USE_RC_SUBR
- make sure thread libs are detected/used correctly on all OSVERSIONs
- change default database directory to /var/db/mt-daapd.
- change default mp3 dir to ${PREFIX}/share/mt-daap
- tell users whatvariables to they can set to customize their installation
- move pkg-deinstall, pkg-install and files/mt-daapd.conf in FILESDIR to be
able to respect user choices.
- portlint

PR:		ports/95190 reworked extensively by me
Submitted by:	Alexander Botero-Lowry <alex@foxybanana.com> (now maintianer)
2006-06-25 13:17:25 +00:00

33 lines
717 B
Bash

#!/bin/sh
#
# $FreeBSD$
# formerly $ FreeBSD: ports/audio/mt-daapd/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