summaryrefslogtreecommitdiff
path: root/sysutils/user_darwin/files/groupdel.sh
blob: 678a0c0450cb6809a0456a645852763b4adbcffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

if [ $# -gt 1 ]; then
    echo "groupdel: Unrecognized option $1" 1>&2
    exit 1
fi

group="$1"
if [ -z "$group" ]; then
    echo "groupdel: Must specify group" 1>&2
    exit 1
fi

if ! niutil -destroy . /groups/$group 2>/dev/null; then
    echo "groupdel: Could not delete group" 1>&2
    exit 1
fi