diff --git a/scripts/crack_docker.sh b/scripts/crack_docker.sh index 5b59f49..111dcd6 100644 --- a/scripts/crack_docker.sh +++ b/scripts/crack_docker.sh @@ -5,7 +5,7 @@ PLEX_CONFIG_DIR=/config PLEX_CONTAINER_NAME=plex -PLEX_MEDIA_SERVER_DIR=$(ps aux | grep 'Plex Media Server' | grep -v grep | awk '{print $11}' | xargs dirname) +PLEX_MEDIA_SERVER_DIR=$(ps aux | grep 'Plex Media Server' | grep -v grep | awk '{print $11}' | xargs dirname | uniq) if [ `id -u` -ne 0 ] && ! groups $(whoami) | grep -q '\bdocker\b'; then echo "Run this script as root or through 'sudo'. Alternatively, add your user account to the 'docker' group. Script aborting." diff --git a/scripts/crack_native.sh b/scripts/crack_native.sh index 3a9df7b..2ec53f1 100644 --- a/scripts/crack_native.sh +++ b/scripts/crack_native.sh @@ -2,7 +2,7 @@ # The script assumes Plex Media Server is currently running. -PLEX_MEDIA_SERVER_DIR=$(ps aux | grep 'Plex Media Server' | grep -v grep | awk '{print $11}' | xargs dirname) +PLEX_MEDIA_SERVER_DIR=$(ps aux | grep 'Plex Media Server' | grep -v grep | awk '{print $11}' | xargs dirname | uniq) if [ `id -u` -ne 0 ]; then echo "Run this script as root or with sudo. Script aborting."