8e8a7e0e30
MediaTomb is an open source (GPL) UPnP MediaServer with a nice web user interface, it allows you to stream your digital media through your home network and listen to/watch it on a variety of UPnP compatible devices. MediaTomb implements the UPnP MediaServer V 1.0 specification that can be found on http://www.upnp.org/. The current implementation focuses on parts that are required by the specification, however we look into extending the functionality to cover the optional parts of the spec as well. WWW: http://mediatomb.cc/ - Leonhard Wimmer leo@mediatomb.cc PR: ports/111038 Submitted by: Leonhard Wimmer <leo at mediatomb.cc>
40 lines
767 B
Bash
40 lines
767 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
#
|
|
|
|
if [ "$2" != "PRE-INSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
PREFIX=${PKG_PREFIX:-%%PREFIX%%}
|
|
|
|
USER=%%MEDIATOMB_USER%%
|
|
GROUP=%%MEDIATOMB_GROUP%%
|
|
|
|
PW="pw"
|
|
INSTALL=%%INSTALL%%
|
|
DIR=%%MEDIATOMB_DIR%%
|
|
MASK=%%MEDIATOMB_MASK%%
|
|
|
|
if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then
|
|
if ${PW} groupadd ${GROUP}; then
|
|
echo "Added group \"${GROUP}\"."
|
|
else
|
|
echo "Adding group \"${GROUP}\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then
|
|
if ${PW} useradd ${USER} -g ${GROUP} -h - \
|
|
-s "/sbin/nologin" -d "/nonexistent" \
|
|
-c "MediaTomb"; \
|
|
then
|
|
echo "Added user \"${USER}\"."
|
|
else
|
|
echo "Adding user \"${USER}\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
exit 0
|