This script has only been tested with FreeBSD
You will need to create two .txt files in the same directory as the script for this to work.
x-plex_token.txt
plex_version.txt
For plexpass you need to paste your plex token in the x-plex-token.txt file. To locate this token google "x-plex token". The plex_version file auto populates to keep track of current version that is installed.
sh plex_auto_update.sh
Crontab to run everyday at 4am
0 4 * * * cd /plex_autoupdate && /bin/sh ./plex_auto_update.sh