summarylogtreecommitdiffstats
path: root/prosody.install
blob: 5b8f88f7c8efa54d01a04a0d6900d15833586efa (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
post_install() {
    systemd-sysusers prosody.conf
    systemd-tmpfiles --create prosody.conf

    chown prosody:jabber var/lib/prosody
    [ -d var/log/prosody ] && chown prosody:jabber var/log/prosody

    echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody"
}

post_upgrade() {
    post_install $1
}

post_remove() {
    paths=(/etc/prosody /var/lib/prosody /var/log/prosody
           /var/log/old/prosody)
    first=true
    for path in ${paths[@]}; do
        if [ -d $path ]; then
            if $first; then
                first=false
                echo "==> Leftover Paths:"
            fi
            echo "==> $path"
        fi
    done
}