From: Raphael Voyazopoulos Date: Tue, 13 Feb 2018 14:55:53 +0000 (+0100) Subject: Fixed crashing script on macOS because of chown with a non-existent user X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=27511e065e18f5ebc1d20a8e36238952ecc8333e;p=docker-django-scripts.git Fixed crashing script on macOS because of chown with a non-existent user --- 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