From 0cc92f5e21cea3b94a413353ae0acec8758ee1b7 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 21 Nov 2019 16:31:55 +0100 Subject: [PATCH] fix: [mattermost] remove find as it was complaining about environment size Signed-off-by: Valentin Lab --- mattermost/hooks/init | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mattermost/hooks/init b/mattermost/hooks/init index c27e453b..c29d44c0 100755 --- a/mattermost/hooks/init +++ b/mattermost/hooks/init @@ -11,9 +11,6 @@ ## - SERVICE_CONFIGSTORE Location on host of the CONFIGSTORE of this service -# Please note that postgres detect on its own if its datadir needs to be populated - - ## ## checking permission of base directory ## @@ -21,6 +18,10 @@ dirs=("$SERVICE_CONFIGSTORE/mattermost/"{config,plugins} "$SERVICE_DATASTORE/mattermost/"{data,logs}) for dir in "${dirs[@]}"; do mkdir -p "$dir" - find "$dir" \! -uid 2000 -exec chown -v 2000 {} \; - find "$dir" \! -gid 2000 -exec chgrp -v 2000 {} \; + find "$dir" \! -uid 2000 -print0 | while read-0 f; do + chown -v 2000 "$f" + done + find "$dir" \! -gid 2000 -print0 | while read-0 f; do + chgrp -v 2000 "$f" + done done