summarylogtreecommitdiffstats
path: root/pgagroal.install
blob: ba2c54b07851d16c1f4ba92196f9614b2ce63408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Description: post-install script for pgagroal
# Contributor: Marc Rechté <mrechte@gmail.com>


# arg 1: new package version
post_install() {
    # create pgagroal user
    if [ -z "`grep '^pgagroal:' /etc/passwd`" ]; then
        useradd -m -s /bin/bash pgagroal
    fi

    # ownership to pgagroal facilitates configuration
    chown -R pgagroal: /etc/pgagroal
    # may contain sensitive data
    chmod 0750 /etc/pgagroal
}


# arg 1: new package version
# arg 2: old package version
post_upgrade() {
    post_install $1
}


# arg 1: old package version
pre_remove() {
    userdel pgagroal
}