#!/bin/bash while [ true ] do echo "quering bearerbox" sleep 1 count=$(ps -C "bearerbox" | wc -l) echo $count if [ $count -eq 2 ] then echo "attempting to kill bearerbox" killall bearerbox else sleep 1 echo "======= bearerbox killed ========" break fi done sleep 1 bearerbox /etc/kannel/kannel.conf smsfox /etc/kannel/kannel.conf
Internet is vague. It has nothing left to be covered now. However, things get messed up sometimes and I forgot where I used to find the materials I had just searched for some days ago. So, I am now gathering all those into this blog. This is just my bookmark or my scrapbook or anything you wish to say. If you think these are helpful, you can take references, no any rights to be defined here. No styles and no colorful designs, just an area to jot down some scraps and all. Enjoy
Pages
Wednesday, June 23, 2010
Kannel restart script | Attempting to Kill a process in linux until it gets killed
Restarting kannel wasn't simpler, as the bearerbox was not exiting on single stop command for Kannel. So needed to do some tricks on killing the bearerbox first. See the code
Labels:
administration,
bash shell,
Command Help,
fork,
HowTO,
kannel,
Linux,
process,
process management,
Programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment