cowboy / synology-update-plex

Script to Auto Update Plex Media Server on Synology NAS
113 stars 22 forks source link

Noty #35

Closed bolshukhin closed 1 year ago

bolshukhin commented 3 years ago

How to use e-mail noty via oven NAS settings/solutions?

function init_notifications() { local lang="$(source /etc/synoinfo.conf; echo "$maillang")" local mails_file=/var/cache/texts/$lang/mails if [[ ! -e "$mails_file" ]]; then header "Initializing notification system" echo "Notifications disabled (file $mails_file not found)" return fi if [[ ! "$(grep PlexUpdateInstalled $mails_file || true)" ]]; then header "Initializing notification system" cp $mails_file $mails_file.bak cat << 'EOF' >> $mails_file [PlexUpdateInstalled] Subject: Successfully updated Plex to %PLEX_VERSION% on %HOSTNAME% Dear user, Successfully updated Plex to %PLEX_VERSION% on %HOSTNAME%

https://github.com/cowboy/synology-update-plex [PlexUpdateError] Subject: Unable to update Plex to %PLEX_VERSION% on %HOSTNAME% Dear user, Unable to update Plex to %PLEX_VERSION% on %HOSTNAME%. If this error persists, enable saving output results in Task Scheduler and file an issue at https://github.com/cowboy/synology-update-plex/issues including the script output.

https://github.com/cowboy/synology-update-plex EOF echo 'Notifications installed' fi }