#!/usr/bin/env sh # vim:set ts=4 sw=4 et: post_install() { local username="sonarqube" if ! getent passwd "$username" &>/dev/null; then groupadd -g 123 "$username" useradd -c 'User to manage the SonarQube code analysis platform' -u 123 -g "$username" -d "/var/lib/$username" -s /bin/false "$username" passwd -l "$username" &>/dev/null fi chown -R "$username:$username" /etc/sonarqube /run/sonarqube /usr/share/sonarqube /var/log/sonarqube }