If you want your pi to auto-update plexamp every week, ssh into your pi and run:
crontab -e
Edit the file by adding the following to the bottom, replacing USERNAME with the actual username you’re using.
# Upgrade plexamp every Monday early AM
0 3 * * 1 /home/USERNAME/plexamp/upgrade.sh
30 3 * * 1 sudo /usr/sbin/reboot
This upgrades plexamp every Monday at 3AM and reboots 30 minutes later. Even if the reboot isn’t required for the upgrade, it’s nice to do to clear any gremlins.
I had issues after upgrading and rebooting - my plexamp.service file reverted to using the username pi instead of my actual username, and this prevented the service from running. I added more cron jobs to fix this. My crontab looks like this now (again, replace USERNAME with your actual username):
# Upgrade plexamp every Monday early AM
0 3 * * 1 /home/USERNAME/plexamp/upgrade.sh
30 3 * * 1 sudo /usr/sbin/reboot
# Fix the username used in the service file
35 3 * * 1 sed -i 's/User=pi/User=USERNAME/g' plexamp/plexamp.service && sed -i 's/\/pi\//\/USERNAME\//g' plexamp/plexamp.service && sudo /usr/sbin/reboot
The sudo /usr/bin/reboot commands only work if your system doesn’t require you to input your password when you run a sudo command.