Dispatcharr/docker/init/03-init-dispatcharr.sh
2025-04-02 16:29:35 -04:00

24 lines
620 B
Bash

#!/bin/bash
mkdir -p /data/logos
sed -i "s/NGINX_PORT/${DISPATCHARR_PORT}/g" /etc/nginx/sites-enabled/default
# 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:$PGID /app/uwsgi.sock
# Create and set permissions for the media / cache directories
mkdir -p /app/media
chown -R $PUID:$PGID /app
echo "Created and set permissions for cached_m3u directory"
chown -R $PUID:$PGID /data/logos
# Permissions
chown -R postgres:postgres /data/db
fi