#!/bin/sh set -e if [ "$(id -u)" -eq 0 ]; then [ -n "${PUID}" ] && usermod -u "${PUID}" monkey [ -n "${PGID}" ] && groupmod -g "${PGID}" monkey fi printf "Configuring application...\n" if [ "$(id -u)" -eq 0 ]; then printf "Switching UID=%s and GID=%s\n" "$(id -u monkey)" "$(id -g monkey)" exec su-exec monkey:monkey "$@" else exec "$@" fi