initial commit

This commit is contained in:
Fabio Scotto di Santolo
2020-07-28 19:28:25 +02:00
commit 4cc88d2f6e
245 changed files with 22820 additions and 0 deletions

21
chapter10/function_mon_proc_end Executable file
View File

@@ -0,0 +1,21 @@
mon_proc_end ()
{
END_RC="0"
until (( END_RC != 0 ))
do
ps aux | grep -v "grep $PROCESS" | grep -v $SCRIPT_NAME \
| grep $PROCESS >/dev/null 2>&1
END_RC=$? # Check the Return Code!!
sleep 1 # Needed to reduce CPU load!
done
echo 'N' # Turn the RUN flag off
# Grab a Timestamp
TIMESTAMP=$(date +%D@%T)
echo "END PROCESS: $PROCESS ended ==> $TIMESTAMP" >> $LOGFILE &
echo "END PROCESS: $PROCESS ended ==> $TIMESTAMP" > $TTY
}