1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00
freebsd-ports/net-mgmt/nefu/pkg-install
Rong-En Fan 3c2bcf7ec2 - Use fix uid and gid
- Fix broken --without-html with patches
- Add OPTIONS for HTML
- Add rc script
- Pass maintainership to submitter

PR:		ports/126787
Submitted by:	decke at bluelife.at
2009-04-07 11:49:00 +00:00

26 lines
652 B
Bash

#!/bin/sh
case $2 in
POST-INSTALL)
USER=nefu
GROUP=nefu
UID=918
GID=918
if pw groupshow "${GROUP}" > /dev/null 2>&1; then
echo "===> Using existing group ${GROUP}"
else
echo "===> Adding group ${GROUP}"
pw groupadd ${GROUP} -g ${GID} || exit 1
fi
if pw usershow "${USER}" > /dev/null 2>&1; then
echo "===> Using existing user ${USER}"
else
echo "===> Adding user ${USER}"
pw adduser ${USER} -u ${UID} -g ${GROUP} -h - -d "/var/db/nefu" \
-s "/sbin/nologin" -c "Nefu daemon" || exit 1
fi
;;
esac