From 96a7fd9ff25a6ffad9ae97f3f55f77e2a75a303a Mon Sep 17 00:00:00 2001 From: Gunnar Schaefer Date: Tue, 30 Jan 2018 11:49:59 -0800 Subject: [PATCH] Only chown if needed --- bin/dev+mongo.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100755 => 100644 bin/dev+mongo.sh diff --git a/bin/dev+mongo.sh b/bin/dev+mongo.sh old mode 100755 new mode 100644 index bc329f248..78ffbc27c --- a/bin/dev+mongo.sh +++ b/bin/dev+mongo.sh @@ -3,6 +3,8 @@ mongod & MONGOD_PID=$! -chown nobody:nobody -R $SCITRAN_PERSISTENT_DATA_PATH +if [ "$(stat -c %U:%G $SCITRAN_PERSISTENT_DATA_PATH)" != "nobody:nobody" ]; then + chown nobody:nobody -R $SCITRAN_PERSISTENT_DATA_PATH +fi exec unitd --control "*:8080" --no-daemon --log /dev/stdout