kill
#!/bin/bash
# @author David BAILLY
# @date january 2012
# @brief Kills the processes which id's are in the kill.tmp file
#If you want to kill everything in one shot
#~ for i in `cat kill.tmp | awk '{print $2}'`
#~ do
#~ kill -s SIGINT $i
#~ sleep 1.5
#~ done
#If you need to send signal to specific script before to kill them
for i in `cat kill.tmp | grep promethe | awk '{print $2}'`
do
kill -s SIGINT $i
sleep 1.5
done
for i in `cat kill.tmp | grep run.sh | awk '{print $2}'`
do
kill -s SIGINT $i
sleep 1.5
done
#Delete the temporary file
rm -f kill.tmp
Ce script est le pendant du script launch. Il peut être mis directement dans ce dernier si nécessaire. Il permet d'envoyer des signaux à une série de process dont les id ont été stocké dans kill.tmp.