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"