aboutsummaryrefslogtreecommitdiffstats
path: root/community/nextcloud/occ
blob: 1e3c095adcb71d30bc9a179befd02f96169225a1 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

NEXTCLOUD_DIR='/usr/share/webapps/nextcloud'
: ${NEXTCLOUD_USER:="nextcloud"}

if [ "$(id -un)" != "$NEXTCLOUD_USER" ]; then
	exec su -s /bin/sh "$NEXTCLOUD_USER" -c '$0 "$@"' -- $NEXTCLOUD_DIR/occ "$@"
else
	exec $NEXTCLOUD_DIR/occ "$@"
fi