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