I've been painstakingly going through this tutorial. I'm a unix noob and getting hung up deciphering some of the commands in the code block below. If any one could help me out with a basic description of what the highlighted commands are doing with respect to their syntax I'd very much appreciated it.
Code Block:
. /etc/init.d/functions
#startup values
log=/var/log/Daemon.log
#verify that the executable exists
test -x /home/godlikemouse/Daemon.php || exit 0RETVAL=0
prog="Daemon"
proc=/var/lock/subsys/Daemon
bin=/home/godlikemouse/Daemon.php
start() {
# Check if Daemon is already running
if [ ! -f $proc ]; then
echo -n $"Starting $prog: "
daemon $bin --log=$log
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $proc
echo
fi
return $RETVAL
}
Highlighted Line #1
test -x /home/godlikemouse/Daemon.php || exit 0RETVAL=0
Highlighted Line #2
[ ! -f $proc ]
Highlighted Line #3
daemon $bin --log=$log
Highlighted Line #4
RETVAL=$?
Highlighted Line #5
[ $RETVAL -eq 0 ] && touch $proc