ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
bash script running as daemon
I have written a bash script to ease my administration.
However, what i would like is, whenever i start this program, it will immediately get in the background and "daemonizes". (Meaning, that it will keep running, even if i log out.)
Is this possible with bash-scripts???
If it works as i expected, i would like to run it as service at startup (put it in the rc.d or rc.local orso), but it should also work as executable....
Since you are using Redhat you have a script handy which will launch a process as a daemon. The script is /etc/rc.d/init.d/functions and you could source that in your script and launch the process like this: