summaryrefslogtreecommitdiff
path: root/user/nextcloud/occ
diff options
context:
space:
mode:
Diffstat (limited to 'user/nextcloud/occ')
-rw-r--r--user/nextcloud/occ10
1 files changed, 10 insertions, 0 deletions
diff --git a/user/nextcloud/occ b/user/nextcloud/occ
new file mode 100644
index 000000000..1e3c095ad
--- /dev/null
+++ b/user/nextcloud/occ
@@ -0,0 +1,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