Skip to content

Commit

Permalink
Fix starting/restarting
Browse files Browse the repository at this point in the history
- remove pid file on start
- first run actually start the server now

Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
  • Loading branch information
dubo-dubon-duponey committed Dec 19, 2019
1 parent 4e0fa27 commit 9ca975b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions runtime/boot/entrypoint.sh
Expand Up @@ -85,12 +85,16 @@ plex::preferences::write(){
dc::xml::set "$1" "$2" "Preferences" "$prefFile"
}


# If the first run completed successfully, start and go
if [ -e /data/.firstRun ]; then
plex::start(){
>&2 printf "Starting Plex Media Server."
rm -f "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}/Plex Media Server/plexmediaserver.pid"
export LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib
exec /usr/lib/plexmediaserver/Plex\ Media\ Server "$@"
}

# If the first run completed successfully, start and go
if [ -e /data/.firstRun ]; then
plex::start "$@"
exit
fi

Expand Down Expand Up @@ -166,6 +170,8 @@ plex::preferences::write "FriendlyName" "$DBDB_SERVER_NAME"
touch /data/.firstRun
>&2 printf "Plex Media Server first run setup complete\n"

plex::start "$@"

# PublishServerOnPlexOnlineKey="1"
# DlnaReportTimeline="0"
# FSEventLibraryPartialScanEnabled="1"
Expand Down

0 comments on commit 9ca975b

Please sign in to comment.