From 27511e065e18f5ebc1d20a8e36238952ecc8333e Mon Sep 17 00:00:00 2001 From: Raphael Voyazopoulos Date: Tue, 13 Feb 2018 15:55:53 +0100 Subject: [PATCH] Fixed crashing script on macOS because of chown with a non-existent user --- pull.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pull.sh b/pull.sh index 3f6998b..9abe193 100755 --- a/pull.sh +++ b/pull.sh @@ -17,5 +17,8 @@ if [ "$1" = "--restore-db" ]; fi # We need to chown folders as they are docker's volumes -sudo chown -R www-data var/media -sudo chown -R root var/backup +# (do not work on OSX, hence the test) +if ! uname -a | grep Darwin > /dev/null; then + sudo chown -R www-data var/media + sudo chown -R root var/backup +fi -- 2.39.5