summarylogtreecommitdiffstats
path: root/sonarqube-lts.install
blob: fc8c6b6838692eb3a6a11186aed58ff1becb0788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env sh
# vim:set ts=4 sw=4 et:

username="sonarqube"

post_install() {
    systemd-sysusers "${username}.conf"
    systemd-tmpfiles --create "${username}.conf"
    chown -R "$username:$username" /etc/$username /run/$username /usr/share/$username /var/log/$username
}


post_upgrade() {
    getent passwd "${username}" >/dev/null 2>&1 || systemd-sysusers "${username}.conf"
    systemd-tmpfiles --create sonarqube.conf

    if [ "$(vercmp $2 5.6)" -lt 0 ]; then
        echo " >> "
        echo " >> Major version update from 4.5.7 to 5.6. Please take a look at http://www.sonarqube.org/downloads/ for more information."
        echo " >> "
    fi
}