BigKjju Posted April 18, 2022 Share #1 Posted April 18, 2022 Hi, i have been wondering, it is possible to set up email notificaiton when system powers on and about to shut down? some of my friends are using my NAS for Plex streaming and some kind of stuff, i shut down and power on automaticaly with tasks every day and some times i shut it down if i know i wont be using it some time (why leave it on when no one is using it) i would like to automaticaly send emails so they know is it posible? DSM 6.1.7, DS3615xs Thank you Quote Link to comment Share on other sites More sharing options...
flyride Posted April 19, 2022 Share #2 Posted April 19, 2022 Task Manager has startup and shutdown triggers. It can also run a custom script. You can install sendmail using Synology packages here: https://geektank.net/2022/01/29/sending-email-from-synology-via-cli-ssh-on-dsm-6/ Put the two together, and voila Quote Link to comment Share on other sites More sharing options...
nadiva Posted April 19, 2022 Share #3 Posted April 19, 2022 All things you wanted to know about notifications but you were afraid to ask: You can set up both events in the Task Manager. 1) Notify via DSM UI notification, this will however not be pushed to the mobile app for xpenlogie: synodsmnotify @administrators System "System is shutting down" 2) For official DSM email delivery, create your own notification in Notifications\Advanced: https://www.beatificabytes.be/send-custom-notifications-from-scripts-running-on-a-synology-new/https://www.beatificabytes.be/send-custom-notifications-from-scripts-running-on-a-synology-new/ then send: /usr/syno/bin/synonotify Shutdown 3) For instant Pushbullet notification, set up notifycli package and run: /volume1/@appstore/nessentials/bin/notify-cli -c pushbullet -p <PushbulletAPIToken> -d <DeviceIden> -t "NAS Alert" -m "System shutdown" --sender <SourceDeviceIden> 4) To get literal audio notification ("System shutdown"), get a free TEXT to MP3 audio file, and play it via: /volume1/@appstore/AudioStation/bin/mplayer /folder/shuttdown.mp3 > /dev/null 2>&1 BONUS: you can have a script that parses all DSM emails, and plays according text via USB speaker 5) To send email without any configurations, no questions asked (if you're running MailServer): echo -e "From: NAS <nas@domain.tld>\nTo: nas@domain.tld\nSubject: NAS alert\n\nSystem shutdown" | ssmtp nas@domain.tld BONUS: you can automatically forward the email to your SMS if your telco provides such service 1 Quote Link to comment Share on other sites More sharing options...
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.