diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-01-24 17:19:50 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-01-24 17:27:52 +0100 |
commit | e87d962796b55707bfdc312940e3233b2113a715 (patch) | |
tree | 2f386c0fb46ed66d1b47a5a33d1a49e47c43b490 | |
parent | 58cb5ce6ea849eebf41045e47a5fe268baa33b42 (diff) | |
download | aports-e87d962796b55707bfdc312940e3233b2113a715.tar.bz2 aports-e87d962796b55707bfdc312940e3233b2113a715.tar.xz |
community/nextcloud: install occ wrapper script into /usr/bin
-rw-r--r-- | community/nextcloud/APKBUILD | 5 | ||||
-rw-r--r-- | community/nextcloud/occ | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/community/nextcloud/APKBUILD b/community/nextcloud/APKBUILD index 7699ed517f..dbb85bd836 100644 --- a/community/nextcloud/APKBUILD +++ b/community/nextcloud/APKBUILD @@ -35,6 +35,7 @@ source="https://download.nextcloud.com/server/prereleases/nextcloud-$_pkgver.zip $pkgname.confd $pkgname.cron fpm-pool.conf + occ " options="!check" pkgusers="nextcloud" @@ -126,6 +127,7 @@ package() { install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname + install -m 755 -D "$srcdir"/occ ./usr/bin/occ # Clean some unnecessary files. find . -name .gitignore -delete \ @@ -234,4 +236,5 @@ d6f951cbcb7ca48beb88d77e02a8669677e87bc32189b1eb7e63edc29c293bd6e1ee471c37b622e6 f224d72799ee5819979089eb58978225454223bee597c938681a4f6279eb49297fe9250ac54ccf8bcb33ae262bce43d085affb77723492ee662263710d4008c9 nextcloud.logrotate 35cf156839215113b5d8fb8842b4c1e19a50be3c16be7048879fdd808674e4875dbacf3e2dd884fd182258595b7a137d7d3c2dc602a7ff5613c8b65fae0abe67 nextcloud.confd edb699ea6127b231793254115b334006c2d50a0d2ecc846188c3521ddffc3c0e19c5e2944f03cae81e6c645c859258380691081b1c522a22d40939b31db36e8a nextcloud.cron -ebe88e451de5dc84ee8bbcd9af48e2ceae4807546b9c069cf15ecc73e2c408a6e8c7502870f7b45a2e5e0632fc7dec878cad24c1d3a20ff3b812067dd7b07de8 fpm-pool.conf" +ebe88e451de5dc84ee8bbcd9af48e2ceae4807546b9c069cf15ecc73e2c408a6e8c7502870f7b45a2e5e0632fc7dec878cad24c1d3a20ff3b812067dd7b07de8 fpm-pool.conf +959852e34f010e635470829d66713f3e22c47717ec2c6487759eed2b6aeff9fd1421fe0271d494a02781bd1c98beb2823583623ee2cf03057cd5db794627d6c2 occ" diff --git a/community/nextcloud/occ b/community/nextcloud/occ new file mode 100644 index 0000000000..1e3c095adc --- /dev/null +++ b/community/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 |