pkgsrc/sysutils/sysbuild-user/INSTALL
jmmv 44f404830e Initial addition of sysbuild-user, version 1.0:
This package installs an unprivileged user for the sysbuild utility
provided by the sysutils/sysbuild package.  This unprivileged user is
automatically configured to perform daily NetBSD builds.
2012-07-25 12:20:08 +00:00

23 lines
749 B
Text

#! /bin/sh
EGDIR="@EGDIR@"
SYSBUILD_HOME="@SYSBUILD_HOME@"
SYSBUILD_USER="@SYSBUILD_USER@"
case "${STAGE}" in
POST-INSTALL)
if [ ! -e "${SYSBUILD_HOME}/.sysbuild/default.conf" ]; then
echo "${PKGNAME}: Installing default configuration file"
${MKDIR} -p "${SYSBUILD_HOME}/.sysbuild"
( cd "${SYSBUILD_HOME}/.sysbuild" && ln -s ../default.conf . )
fi
if crontab -u "${SYSBUILD_USER}" -l >/dev/null 2>/dev/null; then
echo "${PKGNAME}: ${SYSBUILD_USER} already has a crontab;" \
"not installing"
else
echo "${PKGNAME}: Installing default crontab for ${SYSBUILD_USER}"
crontab -u "${SYSBUILD_USER}" "${EGDIR}/crontab"
fi
;;
esac