2004-03-17 14:47:27 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
2004-03-27 06:11:21 +01:00
|
|
|
case "${HOME}" in
|
|
|
|
"")
|
|
|
|
export POPFILE_USER_DEFAULT=/var/db/popfile
|
|
|
|
;;
|
|
|
|
*)
|
2004-03-27 06:19:40 +01:00
|
|
|
export POPFILE_USER_DEFAULT="${HOME}/.popfile"
|
2004-03-27 06:11:21 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo "$1"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2004-03-17 14:47:27 +01:00
|
|
|
export POPFILE_ROOT=%%DATADIR%%
|
2004-03-27 06:11:21 +01:00
|
|
|
export POPFILE_USER=${POPFILE_USER:-${POPFILE_USER_DEFAULT}}
|
2004-03-17 14:47:27 +01:00
|
|
|
|
2004-03-27 06:19:40 +01:00
|
|
|
mkdir -p "${POPFILE_USER}" || die "mkdir ${POPFILE_USER} failed"
|
|
|
|
cd "${POPFILE_USER}"
|
2004-03-17 14:47:27 +01:00
|
|
|
%%DATADIR%%/popfile.pl >/dev/null 2>&1 &
|