ayaports/apk/main/nextcloud/occ
2020-04-14 16:13:12 +00:00

10 lines
252 B
Bash

#!/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