#!/bin/sh # It's very important to set user/group correctly. loomio_dir='/var/lib/loomio' if ! getent group loomio 1>/dev/null; then echo '* Creating group loomio' 1>&2 addgroup -S loomio fi if ! id loomio 2>/dev/null 1>&2; then echo '* Creating user loomio' 1>&2 adduser -DHS -G loomio -h "$loomio_dir" -s /bin/sh \ -g "added by apk for loomio" loomio passwd -u loomio 1>/dev/null # unlock fi if ! id -Gn loomio | grep -Fq redis; then echo '* Adding user loomio to group www-data' 1>&2 addgroup loomio www-data fi exit 0