Can someone please tell me when I do "meta refresh" like below,will that also run bash program-run-tmp-directory3.sh &> stdout.out & again? OR, only the browser will be refreshed keeping the apache alive?
"pid" is the "process ID" of the program run in the background.
If this code below also reruns the program bash program-run-tmp-directory3.sh &> stdout.out &. Please let me know how can I avoid it?
#!/bin/sh
echo "Content-type: text/html"
echo ""
bash program-run-tmp-directory3.sh &> stdout.out &
pid=$!
if [[ `ps -p $pid | wc -l` -gt 1 ]]
then
output="Program is running. Running time depends on the number of alternatively spliced proteins the submitted gene has. Results will be displayed here."
echo "<html>"
echo "<head>"
echo "<meta http-equiv=\"refresh\" content=\"10\"/>"
echo "</head>"
echo "<body>"
echo "<table width=\"750\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
echo "<tr><td><img src=\"../../images/calc.gif\" align=\"absmiddle\"> <strong> $output </strong></td></tr>"
echo "</table>"
echo "</body>"
echo "</html>"
fi
Thanks.