2
0
mirror of https://github.com/spritsail/plex-media-server.git synced 2025-06-10 21:21:13 +00:00

Allow server claiming at any time

This commit is contained in:
2018-10-04 12:48:52 +01:00
parent e36ec1723e
commit dac8a21edc
5 changed files with 94 additions and 36 deletions

View File

@ -44,11 +44,19 @@ export PREF_FILE="$CONFIG_DIR/Preferences.xml"
exec su-exec -e sh <<EOF
source plex-util.sh
# Generate a default configuration on first run, including some user-specified values
if [ ! -e "\$PREF_FILE" ]; then
source gen-config.sh
fi
# Always attempt to claim an unclaimed server in case it was signed out
token="\$(getPref "PlexOnlineToken")"
if [ ! -z "\${PLEX_CLAIM}" ] && [ -z "\${token}" ]; then
claim-server.sh --load-client-id --save
fi
# Duplicate the Plex logs to stdout (docker logs)
tail -Fn 0 "\$CONFIG_DIR/Logs/Plex Media Server.log" 2>/dev/null &