Having your Linux system email you! | How to write a script which emails you

Quite often you need to write scripts which need to email you urgent information, there is a very simply way to do this.

First we need to install an email server to transmit the emails.

Then insert the following into your script.

In the above example it will email a copy of your local host file, change be change for any file you want transmitted.

See this script for a working example.

Visibility when your IP changes and is updated by no-ip | email notification when ip changes home adsl nbn bash script

My new internet connection with NBN changes the IP on a regular basis, but I wanted visibility as to how often.

So I’ve written a bash script which records your IP and date, once it changes it records your new IP and sends you an email to notify you of the new change.

This is completed by querying your no-ip dns record.



Cron Entry. (runs every hour)



SD Card review on the Raspberry Pi | Improving the raspberry pis performance with different storage cd card

I was running Nextcloud on a Raspberry Pi zero w, the performance is not there.

I ran top to determine the IO Wait times, it was high. High enough that the performance would be impacted.

I ran a test on two different cards.

The is a Sandisk Ultra 16gb ($9) and the Sandisk Extreme Pro 128gb ($120), looks like the price does not improve performance on the raspberry pi Zero. I will write another article when I test the latest Raspberry Pi and see if the results change.

Sandisk Ultra

Sandisk Extreme Pro


IBM Lenovo T400 – Wont turn on! | lenovo t400 broken wont turn on bricked

I had a Lenovo T400 which didn’t boot, didn’t start at all. Wouldn’t even get to the BIOS screen.

During my research I found numerous articles with fixes.

In this particular situation it was the BIOS Battery which fixed it, apparently if the laptop is drained completely of power and left for a while the system refuses to start up again.

So you need to remove the screws from the back which hold the wrist rest and remove it. You will see the bios battery either next to the trackpad of under the keyboard.

Remove the battery for 30 seconds and put everything together again.

Encrypting your home area for backup with Openssl | using openssl to encrypte and automate your backups to fileserver

Im currently running a Linux desktop, the other day the disk become corrupt and I lost my home area. Not a big problem as I dont store much data, but I lost all my ssh keys, configs etc. It took a few days to recover.

In an effort to stop that from happening again I want to backup all my data to the company file server, but I dont want them to have access to my keys and configs ect.

So I have scripted a backup which will encrypt on the fly. Through it into cron and you have a daily backup.

This is the command you run to create backup, notice the password is in the command. This is allow for automated backups using Cron.

And the following command is to run a restore, once executed you will be prompted for the password.