#!/bin/sh

[ -n "${PUID}" ] && usermod -u "${PUID}" msgbus
[ -n "${PGID}" ] && groupmod -g "${PGID}" msgbus

printf "Switching UID=%s and GID=%s\n" "${PUID}" "${PGID}"
exec su-exec msgbus:msgbus "$@"
