Category Archives: Scripts

Repair broken Windows trust relationship between domain controller and client machine

Repair broken trust relationship between domain controller and client machine Trust as the word indicates “Allow without fear”, the domain controller and client trust each other using a bond. Clients accept securities, policies, authentication mechanism etc. deployed in the domain controller and domain controller accepts and agrees communications from client machine. If the trust was […]

Looking for a Funny VB Script to Eject CDROM

Looking for a Funny VB Script to Eject CDROM To have a little fun with my Colleagues I searched for a VB script to eject the CDROM and here it is, Set oWMP = CreateObject(“WMPlayer.OCX.7″) Set colCDROMs = oWMP.cdromCollection If colCDROMs.Count >= 1 Then For i = 0 To colCDROMs.Count – 1 colCDROMs.Item(i).Eject Next ‘ […]

VB Script to Monitor Windows Process and send alerts

VB Script to Monitor Windows Process Monitoring a Windows process is different from service monitoring. I was using IPSentry to monitor few of my websites, but the IPSentry applications was crashing without my knowledge and thus leaving the websites with no monitoring. So I setup a Windows schedule task with the following VB script to […]

Bash Script For Subversion (Svn) Repository/Project Creation And User Management

Bash Script For Subversion (Svn) Repository/Project Creation And User Management In an organization project revisions and sharing is mostly done through subversion or concurrent versions system. This repositories also act as backup solution. Creating new projects, editing apache svn.conf, add new users and their passwords are time taking. Inorder to make it simple i have […]

Simple monitoring script using pgrep command

This is a usefull script to monitor the service status. The script checks the service status using pgrep command. If the command return zero script identifies the service down and send us an alert email. #!/bin/bash apache=`pgrep httpd` mysql=`pgrep mysqld` tmp=”/tmp/monitoring.tmp” touch /tmp/monitoring.tmp if [ -n “$apache” ] then echo “Apache Is Working” else echo […]

Simple Bash Script To Send Email Message

Here is a small script that used to send email from bash, #!/bin/bash #Enter the email address to which we need to send the message EMAIL=”**@talk2melbin.com” #Enter the subject of the email SUBJECT=”Alert Service Down” #Enter the body of the message, read it from a file MESSAGE=”/tmp/monitoring.tmp” #Mail command to send the email /bin/mail -s […]

Simple Backup Script With Compression And Date Checking

To secure the data we usually use backup process. In order make the backup process automatic in Linux we usually use scripts. Here i would like to describe a small backup script which backup apache document root to a secure backup location. The script backup all the folder and file from the apache document root. […]