#!/usr/bin/with-contenv bash # check for preferences file and exit out if not found [[ ! -e "/config/Library/Application Support/Plex Media Server/Preferences.xml" ]] && \ exit 0 if [ ! -f "/config/Library/linuxserver-chown.lock" ]; then find /config/Library ! \( -user abc -a -group abc \) -print0 | xargs -0 chown abc:abc touch /config/Library/linuxserver-chown.lock chown abc:abc /config/Library/linuxserver-chown.lock fi