- Create a working directory for your updates, ex:
/root/scripts/plex-update/
- Download a copy of
plex-update.sh
and make it executable - Find your Plex Token
nano plex-update.sh
and set thePLEX_TOKEN
variable- Test the script
./plex-update.sh
- Schedule the updates regularly:
crontab -e
0 3 * * * cd /root/scripts/plex-update && ./plex-update.sh
- Need help with cron syntax? https://www.binarybabel.org/tech/os/unix/cron/
You can serve status.xml to a local web-server and check its output with a network monitoring system.
cp -av $UPDATE_STATUS_FILE /srv/www/htdocs/ # Optional, for NMS
Use a web-check to search for the string 'size="1"', or alternatively
parse the xml file and use the XPath count(/MediaContainer[@size=1])
.