Tag: bash

Checking website status with Bash under Ubuntu

Posted by – July 29, 2011

With few lines of code we can create a very smart bash script that doest the website status check for us, this script uses the ubuntu notification system to display a notification on desktop if the website goes down.

Here’s how you can do this.

First, you need to install required packages:

sudo apt-get install libnotify-bin msmtp openssl ca-certificates

And now configure account in msmtp:



Fetching a Daily Opennms Hardware Report

Posted by – June 27, 2008

The code below shows how can you retrieve a daily hardware report from opennms server, you can change this script to fetch the hardware report of several days without care if the current day is the first os last day of month because the date range is calculated in seconds and not based on math operations in day of month.