From 489835030420ab51ed10768d2bf3b6490b62c7fd Mon Sep 17 00:00:00 2001 From: chbmb Date: Wed, 3 Jun 2020 16:57:13 +0100 Subject: [PATCH 1/2] Fix occ alias --- root/etc/cont-init.d/70-aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/70-aliases b/root/etc/cont-init.d/70-aliases index 48c3fdd..63415fd 100644 --- a/root/etc/cont-init.d/70-aliases +++ b/root/etc/cont-init.d/70-aliases @@ -2,7 +2,7 @@ ## Set alias for occ and make executable [[ ! -f /usr/bin/occ ]] && \ - echo -e '#!/bin/bash\nsudo -u abc php7 /config/www/nextcloud/occ' > /usr/bin/occ + echo -e '#!/bin/bash\nsudo -u abc -s /bin/bash -c "php7 /config/www/nextcloud/occ $@"' > /usr/bin/occ [[ ! -x /usr/bin/occ ]] && \ chmod +x /usr/bin/occ From 0d9395c2f904da27532a8ca3fb2a471f11ee9294 Mon Sep 17 00:00:00 2001 From: chbmb Date: Wed, 3 Jun 2020 18:19:58 +0100 Subject: [PATCH 2/2] Pass command switches correctly. --- root/etc/cont-init.d/70-aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/70-aliases b/root/etc/cont-init.d/70-aliases index 63415fd..1a45d9f 100644 --- a/root/etc/cont-init.d/70-aliases +++ b/root/etc/cont-init.d/70-aliases @@ -2,7 +2,7 @@ ## Set alias for occ and make executable [[ ! -f /usr/bin/occ ]] && \ - echo -e '#!/bin/bash\nsudo -u abc -s /bin/bash -c "php7 /config/www/nextcloud/occ $@"' > /usr/bin/occ + echo -e '#!/bin/bash\nsudo -u abc -s /bin/bash -c "php7 /config/www/nextcloud/occ $*"' > /usr/bin/occ [[ ! -x /usr/bin/occ ]] && \ chmod +x /usr/bin/occ