33 lines
588 B
Plaintext
33 lines
588 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
#
|
||
|
# $FreeBSD$
|
||
|
#
|
||
|
|
||
|
PATH=$PATH:/bin:/usr/sbin
|
||
|
export PATH
|
||
|
|
||
|
|
||
|
if [ "$2" = "POST-INSTALL" ]; then
|
||
|
|
||
|
if grep "^smfsav:" /etc/group > /dev/null; then
|
||
|
:
|
||
|
else
|
||
|
echo "[*] Adding group \"smfsav\""
|
||
|
pw groupadd -n smfsav -g 666
|
||
|
fi
|
||
|
|
||
|
if grep "^smfsav:" /etc/passwd > /dev/null; then
|
||
|
:
|
||
|
else
|
||
|
echo "[*] Adding user \"smfsav\""
|
||
|
pw useradd -c SMFSAV -g smfsav -n smfsav -d /nonexistent -s /usr/sbin/nologin -u 666
|
||
|
fi
|
||
|
|
||
|
echo "[*] Creating directory \"/var/run/smfsav\""
|
||
|
mkdir /var/run/smfsav
|
||
|
chown smfsav:smfsav /var/run/smfsav
|
||
|
chmod 700 /var/run/smfsav
|
||
|
|
||
|
fi
|