Plex in a docker container
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
849 B

  1. #!/bin/bash
  2. echo "Starting Plex Media Server."
  3. home=/var/lib/plexmediaserver/
  4. export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR:-${home}/Library/Application Support}"
  5. export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
  6. export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
  7. export PLEX_MEDIA_SERVER_INFO_VENDOR=Docker
  8. export PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container"
  9. export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
  10. export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
  11. if [ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" ]; then
  12. /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
  13. chown plex:plex "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
  14. fi
  15. exec /bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server'