turbojambox Posted June 16, 2023 Share Posted June 16, 2023 I've been having an issue with one of my unraid servers that I suspect is rebooting, but I have been unable to catch it in the act. I've tried to find a way to setup notifications to be sent when the array starts and/or stops, or even just when the server first boots, but there doesn't seem to be any support for that using the built in notification system. I've looked for custom user scripts that might enable a feature like this, but haven't found anything yet. Does anyone know of a way to do this? Or maybe a way to at least log these events on the system so I can try to find out what is happening and debug. Thanks! Quote Link to comment
Solution itimpi Posted June 16, 2023 Solution Share Posted June 16, 2023 The User Scripts allows you to run scripts at array stop/start/first start so you can easily make a custom script. if you want to send a notification you can use the /usr/local/emhttp/webGui/scripts/notify command. If you want to simply write to the syslog then you can call the ‘logger’ command. Run either of these from a command line with —help to get the options supported. 2 Quote Link to comment
turbojambox Posted June 20, 2023 Author Share Posted June 20, 2023 That works perfectly! The notify script itself didn't return anything with the --help or -h commands on my system, but I just opened /usr/local/emhttp/webGui/scripts/notify in nano and the flags and commands were in there. Super easy - thanks for the help!!! Quote Link to comment
Recommended Posts
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.