How to keep a job running in Linux Rumi, November 13, 2017November 13, 2017 There are many ways to keep a process running on linux but I haven’t seen any that are as easy to implement as the script below. Basically the script does a ps ax and then a grep for your process. If it’s not running it will re-start the process. You install the script into… Continue Reading
Bash Shellshock fix with scripts for Debian, Ubuntu, CentOS and other distros. including old Rumi, October 3, 2014December 19, 2014 First check if your Bash is vulnerable, execute the following command- env x='() { :;}; echo vulnerable’ bash -c ‘echo this is a test’ If your system is vulnerable, you will see: vulnerable this is a test If your system is not vulnerable, you will see: bash: warning: x: ignoring… Continue Reading
Linux service restart shell script Rumi, June 6, 2014 I badly needed a script that would check if my running services (in this script it'll check varnish and apache2 services) are alive- if not, it'll restart the dead service and write a log. Pretty handy! #!/bin/sh STARTAPACHE="/etc/init.d/apache2 start" STARTVARNISH="/etc/init.d/varnish start" Continue Reading
Linux service restart shell script Rumi, November 29, 2013November 29, 2013 I badly needed a script that would check if my running services (in this script it'll check varnish and apache2 services) are alive- if not, it'll restart the dead service and write a log. Pretty handy! Continue Reading
Daily Shell Backup Script Rumi, April 19, 2013 #!/bin/sh DAY=`/bin/date +%Y%m%d` TFILE="/var/log/pdns-cache/$(basename $0).$DAY.csv" rec_control dump-cache $TFILE echo "cache dump completed, dump script by rumi (hasan.emdad@mango.com.bd)" Continue Reading