From 1825bc66640a59e5598c92ba58975e89cdf30279 Mon Sep 17 00:00:00 2001 From: Adam Dodman Date: Wed, 14 Sep 2016 15:12:26 +0100 Subject: [PATCH] Added plex host whitelisting, fix for no net=host --- start.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/start.sh b/start.sh index 3bd00cc..ed24acc 100644 --- a/start.sh +++ b/start.sh @@ -28,6 +28,10 @@ for ((i=0; i<$slen; i++)); do [[ $( ls -dn $VOLDIR/${SERVICES[$i]} | awk '{print $3}') != ${SERVICEUID[$i]} ]] && echo "Chowning $VOLDIR/${SERVICES[$i]} to user ${SERVICEUID[$i]}" && chown ${SERVICEUID[$i]}:${SERVICEUID[$i]} $VOLDIR/${SERVICES[$i]} done +#Since we are not using net=host, we need to whitelist the subnet in plex. ##TODO## Make this overrideable with commandline argument +[[ ! -a $VOLDIR/plex/Plex\ Media\ Server/Preferences.xml ]] && echo Adding subnet to Plex Whitelist... && mkdir -p $VOLDIR/plex/Plex\ Media\ Server/ && \ + echo -e "\n" > $VOLDIR/plex/Plex\ Media\ Server/Preferences.xml && chown -R 787:787 $VOLDIR/plex + [[ ! -a $VOLDIR/launcher/media-compose.yml ]] && echo "Downloading media-compose.yml.." && curl -sSL https://raw.githubusercontent.com/Adam-Ant/media-server-in-a-box/proxy/docker-compose.yml > $VOLDIR/launcher/media-compose.yml [[ ! -a $VOLDIR/launcher/nginx.cfg ]] && echo "Downloading nginx.cfg..." && curl -sSL https://raw.githubusercontent.com/Adam-Ant/media-server-in-a-box/proxy/nginx.cfg > $VOLDIR/launcher/nginx.cfg