Send notifications or email via CLI?


Recommended Posts

I use cron tasks to execute scripts which use rsync to pull files from remote servers to my Unraid box for backup purposes. This is running natively on Unraid, not via a VM.

 

I would like to have the system send me notifications or emails if something goes wrong in my scripts.

 

In previous versions of Unraid, I have piped messages into mail, then when that was no longer available I used the notify command - but that no longer works either?

 

What's the best way to send notifications or emails from the CLI now?

Link to comment

Ahh - I just found another post which used notify, but using the full path. I checked and it works!

 

Turns out notify didn't disappear - it was just no longer in the path.

 

/usr/local/emhttp/webGui/scripts/notify -i warning -s "rsync web1 failed" -d "/mnt/user/Backup/Logs/rsync/rsync.web1.20190410"

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.