From 01f5b99f72d8781a4a8a0c66f71bb9397dec0017 Mon Sep 17 00:00:00 2001 From: dekzter Date: Thu, 6 Mar 2025 16:33:30 -0500 Subject: [PATCH] conditional manage perms since mac doesn't need it --- docker/init/03-init-dispatcharr.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docker/init/03-init-dispatcharr.sh b/docker/init/03-init-dispatcharr.sh index 4aba05d6..951958a2 100644 --- a/docker/init/03-init-dispatcharr.sh +++ b/docker/init/03-init-dispatcharr.sh @@ -2,7 +2,12 @@ # Required so both uwsgi and nginx (www-data) can use it # @TODO: change nginx to run as the same use as uwsgi -touch /app/uwsgi.sock -chown -R $PUID:$PGID /app -chown $PUID:www-data /app/uwsgi.sock -chmod 777 /app/uwsgi.sock + +# NOTE: mac doesn't run as root, so only manage permissions +# if this script is running as root +if [ "$(id -u)" = "0" ]; then + touch /app/uwsgi.sock + chown -R $PUID:$PGID /app + chown $PUID:www-data /app/uwsgi.sock + chmod 777 /app/uwsgi.sock +fi