#!/bin/sh

if [ $(id -u) -eq 0 ]; then
	exec runuser --preserve-environment -u www-data -- /usr/bin/php /usr/share/nextcloud/occ "$@"
else
	exec -u www-data -- /usr/bin/php /usr/share/nextcloud/occ "$@"
fi