I have a lot of servers up and running doing various tasks. They run scripts, and for most of the scripts I want to know if the outcome was good or bad. Especially bad.
The most common and easy way is to send an email for most of the cases, but I don’t want to setup a mailserver such as postfix in order to do it. I prefer to just use a gmail address in order to complete the task easily.
I found an application-utility which does exactly this simple thing. It is written in perl and it is called sendEmail – not to be confused with sendmail. I figured out that because I just install it when I set up a new server, I can’t find any complete instructions and I need to search around every time in order to make it work. Note that you cannot find sendEmail in the usual yum repositories.
Continue reading Install sendEmail (simple SMTP client for Linux) on CentOS
I am not a scripting expert, I have to admit that. I am not a sysadmin either. But I think that every developer has to possess wider knowledge about the tools and the platforms he uses.
At least for me, some basic – intermediate knowledge makes me more productive, has saved the day in the past and also makes my life easier.
For example, the power of Linux is that you can write scripts and schedule them with Cron to do a lot of things that is considered to be “dull-programming-stuff”. Let’s start with backups.
Or scheduling automatic backups for things that matter and are also more tricky to perform than simple file backups.
Or also monitoring website up-times and logging the results.
Continue reading bash scripting