I have a shell script :
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon --user=$user $exec $config &
[ $retval -eq 0 ] && touch $lockfile
This is basically a part of an init.d script.
I want to understand the basic construct in it like what does following do :
1) [ -x $exec ]
2) [ -f $config ]
3) daemon --user=$user $exec $config &
Also in specific what is daemon command do.. looks like it just executes the given program.
Does the --user =$user means that the program is run as from user $user ?