From 8be246469ec0abf5521f869d9fd108067f5ae0d4 Mon Sep 17 00:00:00 2001 From: rudaki Date: Fri, 25 Mar 2022 21:23:30 +1100 Subject: [PATCH] if $GMVAULT_DIR != /data force ownership --- start.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/start.sh b/start.sh index 9410861..8470341 100755 --- a/start.sh +++ b/start.sh @@ -33,6 +33,9 @@ echo "Using user ID $(id -u gmvault)." # Make sure the files are owned by the user executing Gmvault, as we will need # to add/delete files. chown -R gmvault:gmvault /data +if [ "$GMVAULT_DIR" != "/data" ]; then + chown -R gmvault:gmvault $GMVAULT_DIR +fi # Set up crontab. echo "" > $CRONTAB