1
0
mirror of https://github.com/Adam-Ant/media-server-in-a-box synced 2024-11-08 21:46:23 +00:00

Recursively chown config directories

This commit is contained in:
Adam Dodman 2016-09-14 15:34:27 +01:00 committed by GitHub
parent 1825bc6664
commit ad0750ca35

View File

@ -25,7 +25,7 @@ docker-compose version &> /dev/null
slen=${#SERVICES[@]}
for ((i=0; i<$slen; i++)); do
[[ ! -d $VOLDIR/${SERVICES[$i]} ]] && echo "Creating folder $VOLDIR/${SERVICES[$i]}" && mkdir -p $VOLDIR/${SERVICES[$i]}
[[ $( 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]}
[[ $( ls -dn $VOLDIR/${SERVICES[$i]} | awk '{print $3}') != ${SERVICEUID[$i]} ]] && echo "Chowning $VOLDIR/${SERVICES[$i]} to user ${SERVICEUID[$i]}" && chown -R ${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