Thursday, October 20, 2011

How to create a daemon in Bash in Linux

Following is how you can write a daemon in Bash in Linux

- Create script, say runner.sh
- Make it executable
  chmod 500 runner.sh
- Copy to directory /etc/init.d/
- Create link file to the script to have this file up and running
     ln -s /etc/init.d/runner.sh.sh /etc/rc.d/rc3.d/S43runner.sh
     ln -s /etc/init.d/runner.sh.sh /etc/rc.d/rc3.d/K43runner.sh

Wednesday, October 12, 2011

How to see which version of Linux I am running

Run the following command to see all information about which version of LInux you are running
uname -a && cat /etc/*release