rmccullough
Patron
- Joined
- May 17, 2018
- Messages
- 269
I created a cron job that runs every morning to update Plex. Here is the command:
I thought this had been working for a few months, but recently I added a similar cron job for all of my jails. I don't recall if Plex was one of the ones I added it for, or if this has been working for months.
Regardless, I do not receive an email with any kind of error. I just unchecked the checkbox for hiding standard output so I will see what that produces tomorrow.
The behavior seems to be that it does not fully restart Plex. If I run that command from a shell as root (not in the jail) it runs and brings Plex up. I just manually ran the cron job today because Plex wasn't up and it started it.
Do I need to add a sleep? Would it be better to stop the service, run the pkg commands, then start?
iocage exec plex "pkg update ; pkg upgrade -y ; service plexmediaserver_plexpass restart"
I thought this had been working for a few months, but recently I added a similar cron job for all of my jails. I don't recall if Plex was one of the ones I added it for, or if this has been working for months.
Regardless, I do not receive an email with any kind of error. I just unchecked the checkbox for hiding standard output so I will see what that produces tomorrow.
The behavior seems to be that it does not fully restart Plex. If I run that command from a shell as root (not in the jail) it runs and brings Plex up. I just manually ran the cron job today because Plex wasn't up and it started it.
Do I need to add a sleep? Would it be better to stop the service, run the pkg commands, then start?