summarylogtreecommitdiffstats
path: root/icecream.install
blob: 41da5a2fecd93530b629b00097c69b5c0a83adfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
post_install() {
    getent group icecream &>/dev/null || groupadd -r icecream >/dev/null
    getent passwd icecream &>/dev/null || useradd -r -g icecream -s /bin/false \
	    -c "Icecream Daemon" -d /var/cache/icecream icecream 2>/dev/null
    mkdir -p /var/cache/icecream
    mkdir -p /var/log/icecream
    touch /var/log/icecream/scheduler
    touch /var/log/icecream/iceccd
    chown -R icecream:icecream /var/cache/icecream /var/log/icecream/scheduler /var/log/icecream/iceccd
}

post_upgrade() {
    post_install
}

post_remove() {
    getent passwd icecream &>/dev/null && userdel icecream >/dev/null
    getent group icecream &>/dev/null && groupdel icecream >/dev/null
    true
}