From 913d858473a1d44b2ced02e09fddfc4d320848b7 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 25 Mar 2020 22:30:44 +0100 Subject: [PATCH] updated boot script to fix permission --- boot.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/boot.sh b/boot.sh index 0605d78d..e1dc8f31 100644 --- a/boot.sh +++ b/boot.sh @@ -1,4 +1,17 @@ #!/bin/sh + +# Change ownership if needed +if [ ! -n "$(find staticfiles -user "$(id -u)" -print -prune -o -prune)" ] +then + echo "Changing ownership of staticfiles" + chown -R recipes:recipes staticfiles +fi +if [ ! -n "$(find mediafiles -user "$(id -u)" -print -prune -o -prune)" ] +then + echo "Changing ownership of mediafiles" + chown -R recipes:recipes mediafiles +fi + source venv/bin/activate echo "Updating database"