aur/sonarqube/sonarqube.install
2018-01-13 18:09:13 +01:00

22 lines
657 B
Bash

#!/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 5.2 to 5.6. Please take a look at http://www.sonarqube.org/downloads/ for more information."
echo " >> "
fi
}