
#!/usr/bin/bin bash # Wrapper backup-script.sh by Vivek Gite under GPL v2.0+ # - # Set email stuff # warning: must need pre-configured smtpd such as sendmail/postfix # subject= "rsnapshot backup job failed at $HOSTNAME" log_file= "/path/to/my.log.txt" from= to= # start daily backup and set log to $" # Catch errors status= $? alogs= " $(grep -E -wi '^ERROR:|ERROR|WARNING|WARNING:' $log_file)" # If failed, notify using both email and push message to my phone if || Step 2 – Create a shell script wrapper API script Once logged in, register your cli application, set its name, and get an API token in return. Make sure you subscribe to service or get a seven-day trial account. iOS (iPhone, iPod Touch, and iPad) version.

Enough talk, let’s get our hands-on dirty with some examples. The Pushover service seems to fit all my requirements. I needed support for my Perl, Python, and bash/shell scripts.They also have an option to send messages for a group of developers and IT teams. You can send 7,500 messages per month, which is more than sufficient for my needs. To use Pushover for yourself or a small group, it’s just a USD $5 one-time purchase on each platform. I can get a notification for failed backups or my Nginx service overloaded due to problems or MySQL read-only replica running out of sync. Why send a push notifications from Linux CLI?Īs an independent developer and Linux sysadmin, I needed a simple way to get a notification for my side projects using API. Let us see how to use a Linux to send notification to Android or iOS device.

It is a simple app to get real-time notifications on Android, iPhone, iPad, and Desktop, including Android Wear and Apple Watch.

However, today I am going to use straightforward app service called Pushover. We can use the AWS SNS push notification service to send an alert directly to an application on a mobile device. How to push/send message to iOS and Android in real time
