summarylogtreecommitdiffstats
path: root/signald-git.install
blob: d47897d0a483d11bd82fd653ebd76df0c0c9b678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {
    _daemon_uid=565
    if ! getent group signald &>/dev/null; then
        groupadd -r -g ${_daemon_uid} signald >/dev/null
    fi
    if ! getent passwd signald &>/dev/null; then
        useradd -r -u ${_daemon_uid} -g signald -d /var/lib/signald -s /bin/false -c signald signald >/dev/null
    fi
}

post_upgrade() {
    post_install
}

post_remove() {
    if getent passwd signald &>/dev/null; then
        userdel signald >/dev/null
    fi
    if getent group signald &>/dev/null; then
        groupdel signald >/dev/null
    fi
}