#!/bin/bash set -e # check for exisitng user and create it if necessary if ! id -u dash >/dev/null 2>&1; then echo "create dash user" adduser -u 1000 -D -g '' -h $DASH_HOME dash fi # update user rights chown -R dash:dash $DASH_HOME exec "$@"