summaryrefslogtreecommitdiff
path: root/community/ejabberd/ejabberd.install
blob: 4f9fa0a8fcec2b58c2647a6e8d6fb5f03d843e7f (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
post_install() {
    groupadd jabber
    useradd -G jabber -d /var/lib/ejabberd ejabberd
    chown -R ejabberd.jabber /var/log/ejabberd
    chown -R ejabberd.jabber /var/spool/ejabberd
    chown -R ejabberd.jabber /var/lib/ejabberd
    chown root:ejabberd /usr/lib/ejabberd/priv/bin/epam
    chown root:ejabberd /etc/ejabberd/ejabberd.cfg /etc/ejabberd/ejabberdctl.cfg /etc/ejabberd
    chmod 4750 /usr/lib/ejabberd/priv/bin/epam
}

post_upgrade() {
    chown -R ejabberd.jabber /var/log/ejabberd
    chown -R ejabberd.jabber /var/spool/ejabberd
    chown -R ejabberd.jabber /var/lib/ejabberd
    chown root:ejabberd /etc/ejabberd/ejabberd.cfg /etc/ejabberd/ejabberdctl.cfg /etc/ejabberd
    chown root:ejabberd /usr/lib/ejabberd/priv/bin/epam
    chmod 4750 /usr/lib/ejabberd/priv/bin/epam
}

post_remove() {
    userdel ejabberd
    groupdel jabber
}