#!/usr/bin/with-contenv bash # copy config on first run, regardless of update status [[ ! -e /etc/default/plexmediaserver ]] && \ cp /defaults/plexmediaserver /etc/default/plexmediaserver # set no update message [[ -e /tmp/no-version.nfo ]] && \ rm /tmp/no-version.nfo NOVERSION_SET='/tmp/no-version.nfo' cat > "${NOVERSION_SET}" <<-EOFVERSION ####################################################### # Update routine will not run because you havent set # # the VERSION variable, for more information checkout # #  https://github.com/linuxserver/docker-plex # ####################################################### EOFVERSION # test for no version set or opt out for autoupdates if [[ -z "$VERSION" ]] || [[ "$VERSION" == "0" ]] || [[ ! -z "$ADVANCED_DISABLEUPDATES" ]]; then printf "%s\n\n\n" "$( "${NOTOKEN_SET}" <<-EOFTOKEN ##################################################### # Login via the webui at http://:32400/web # # and restart the docker, because there was no # EOFTOKEN # if preferences files doesn't exist, exit out if [ ! -e "/config/Library/Application Support/Plex Media Server/Preferences.xml" ]; then cat >> "${NOTOKEN_SET}" <<-EOFTOKEN # preference file found, possibly first startup. # ##################################################### EOFTOKEN printf "%s\n\n\n" "$(> "${NOTOKEN_SET}" <<-EOFTOKEN # plex token found in the preference file # ##################################################### EOFTOKEN printf "%s\n\n\n" "$(