mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
10e6e5dae2
- Turn into master slave to allow slaves of different architectures - Remove user/group on deinstall - Install rc script as .sample - Various tweaks PR: ports/67463 Submitted by: Tim Bishop <tim@bishnet.net>
29 lines
682 B
Bash
29 lines
682 B
Bash
#!/bin/sh
|
|
|
|
if [ "$2" != "POST-DEINSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
CLIENTUSER=%%CLIENTUSER%%
|
|
CLIENTGROUP=%%CLIENTGROUP%%
|
|
|
|
if /usr/sbin/pw usershow "$CLIENTUSER" 2>/dev/null 1>&2; then
|
|
if /usr/sbin/pw userdel -n $CLIENTUSER; then
|
|
echo "=> Removed user \"$CLIENTUSER\"."
|
|
else
|
|
echo "=> Removing user \"$CLIENTUSER\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if /usr/sbin/pw groupshow "$CLIENTGROUP" 2>/dev/null 1>&2; then
|
|
if /usr/sbin/pw groupdel -n $CLIENTGROUP; then
|
|
echo "=> Removed group \"$CLIENTGROUP\"."
|
|
else
|
|
echo "=> Removing group \"$CLIENTGROUP\" failed..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
exit 0
|