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