Pario TechnoBlob
About
Posts
Tag: mail
One-liner to mail when someone logs in as root
This is a short post describing how to automatically send an email every time someone logs in as root on a linux server. Add the following line to /root/.bash_profile if you...
IP address change notifier script
This is a simple bash script that is run by crontab every 5 minutes on a linux box. It e-mails me the new address when a change of IP address is detected. The script...
Execute commands on multiple hosts using ssh
#!/bin/bash # Linux/UNIX box with ssh key based login SERVERS=”192.168.1.1 192.168.1.2 192.168.1.3″ # SSH User name USR=”jadmin” # Email SUBJECT=”Server user login report”...
Shell script to restart MySQL server if it is killed or not working
Shell script to restart MySQL server if it is killed or not working monitor_mysql.bash #!/bin/bash # Shell script to restart MySQL server if it is killed or not working # due...