mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
5678a5b654
- Fix smokeping user homedir and shell [2] - Bump PORTREVISION Submitted by: "Marcello Gorlani" <gorlani@gorlani.com> [1], "P Bielecki" <pawciobiel@gmail.com> [2]
32 lines
573 B
Bash
32 lines
573 B
Bash
#! /bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
case $2 in
|
|
PRE-INSTALL)
|
|
if ! pw groupshow %%GROUP%% 2>/dev/null 1>&2; then
|
|
if pw groupadd %%GROUP%% -g %%GID%% ; 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%% -u %%UID%% -g %%GROUP%% -h - \
|
|
-s "/sbin/nologin" -d "/nonexistent" \
|
|
-c "SmokePing Daemon"; \
|
|
then
|
|
echo 'Added user "%%USER%%".'
|
|
else
|
|
echo 'Adding user "%%USER%%" failed...'
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
exit 0
|
|
;;
|
|
esac
|