#!/bin/sh # $FreeBSD$ # if [ "$2" != "PRE-INSTALL" ]; then exit 0 fi #PREFIX=${PKG_PREFIX:-%%PREFIX%%} #USER=%%MEDIATOMB_USER%% #GROUP=%%MEDIATOMB_GROUP%% #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