I looking into writing my own
init.d scripts to control several services running on my
Linux server. I came across an example online which contained:
nohup $EXEC_SCRIPT 0<&- &> $LOG_FILE & echo $! > $PID_FILE
From what I understand:
$EXEC_SCRIPTis a variable containing the command to be run
0<&- &>Not come across this before
$EXEC_SCRIPTbut contains the log file path
&starts logging to
$LOG_FILEin the background?
$!is the PID of the most last background command
>writes the result of
I can work through it with this knowledge but the
0<&- &> is completely throwing me off. I don't like to include things that I don't at least partially understand first.