mrworf/plexupdate

Logging and Scheduling Confusion (Where? And)

arkag opened this issue · 2 comments

arkag commented

Hey there,

I'm having trouble finding where logging is set and how this is being scheduled (if at all). I ran through the installer and I think I set it to email me (which I know won't work until I get something like mailgun or sendgrid configured), but I wanted to confirm it was actually running because I know emails aren't going to work right now.

I'd also be grateful for some assistance for getting emails to run effectively through whatever system you guys have set up/are leveraging (I think you're just doing cron emails?)

Thanks,
Alex

The actual logging (meaning stored logs, as opposed to the ephemeral output generated when the script runs) is very basic and is handled exclusively in the cronwrapper script. (this gets symlinked to /etc/cron.daily/plexupdate so it's easier to find, but the "upstream" name is cronwrapper)

Anytime an update runs, the full output of plexupdate is written to a temporary file (/tmp/plexupdate.cron.XXXX where "XXXX" are 4 random characters). If you have syslog support enabled the output is also sent to the logger utility (part of "bsdutils" on Debian-based distros).

Once the script finishes, if you have email notifications turned on, we literally just cat the logfile to STDOUT so that cron picks it up and sends the email.

For getting mail support set up on your system, if you just want something simple to relay email through an external provider (i.e. Gmail), you can use "msmtp". It's easy to set up and works well. I used to recommend "ssmtp" but it's a bit outdated and doesn't always work reliably with Gmail anymore.

arkag commented

Thanks for the info!

I actually just installed OpenMediaVault on this Plex server and set up SendGrid as my mail server, so I'll check to make sure that's working for me tomorrow.