aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nav/pkg-install
blob: f1d894715066143416c6ced81d2d0fd9c5a45ec9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/sh

case "$2" in
PRE-INSTALL)
    set -e
    if ! pw groupshow nav >/dev/null 2>&1 ; then
        pw groupadd nav -g 127
    fi
    if ! pw usershow navcron >/dev/null 2>&1 ; then
        pw useradd navcron -u 127 -g nav -h - \
            -d ${PKG_PREFIX}/nav -s /sbin/nologin \
            -c 'Network Administration Visualized'
    fi
    ;;
DEINSTALL)
    pw userdel navcron
    pw groupdel nav
    ;;
esac