Shell script as a daemon

Ever need to have a bash script put itself to the background on startup. Some call it daemonizing..

if [ "x$1" != "x--" ]; then
$0 -- 1> ~/myscript.out.log 2> ~/myscript.err.log &
exit 0
Posted by on May 18, 2010 in Brain Purge ..

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments are closed.