Jump to content

How to get Notifications for boot-up and shutdown?


dansushi

Recommended Posts

1 hour ago, dansushi said:

Sorry for my ignorance, but what kind of text would I have to put in the config/go file to have it create a notification? Is there documentation for this somewhere? Thanks,

There is the command line tool /usr/local/emhttp/webGui/scripts/notify.  Run it with no parameters to see the options it takes.

Link to comment
On 11/28/2023 at 6:27 PM, itimpi said:

There is the command line tool /usr/local/emhttp/webGui/scripts/notify.  Run it with no parameters to see the options it takes.

You're the best! It worked like a charm. For any others who want to do the same, here's what I've done below.

 

I've added the following line to the /boot/config/go file:

/usr/local/emhttp/webGui/scripts/notify -i "alert" -s "Bootup" -d "Unraid is fully booted up"

 

and created a file at /boot/config/stop with the following code:

#!/bin/bash

/usr/local/emhttp/webGui/scripts/notify -i "alert" -s "Shutdown" -d "Unraid is shutting down"

 

Despite itimpi's concern that the shutdown notification might not get sent, it in fact does work!

  • Like 2
Link to comment
  • 1 month later...

In case anyone else needs this, I was a little confused by the directions.  To get it to work, the shutdown part should not be in the go file.  You should create a new file in the /boot/config folder.  So /boot/config/alert.bin with the code above.

 

Doing this worked for me, it alerts me when a reboot or shutdown is initialized.

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.

×
×
  • Create New...