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