View Single Post
  #5   (View Single Post)  
Old 3rd January 2011
classicmanpro's Avatar
classicmanpro classicmanpro is offline
Real Name: Turea Alexandru Teodor
Fdisk Soldier
 
Join Date: Oct 2010
Location: Sinaia, Romania
Posts: 51
Thumbs up

@JokerBoy: Thanks for the suggestion man, cool idea. I had to adapt your script a little, due to the fact that the processes don't die from a HUP/TERM signal. On NetBSD you have to kill them with the 9 millimeter.

Code:
#!/bin/sh

pName='npviewer.bin'
pCount=`/usr/bin/pgrep $pName | /usr/bin/wc -l`

if [ $pCount -ge 1 ]; then
	/usr/bin/pkill -KILL $pName
fi
__________________
A daemon in need is a daemon indeed.
Reply With Quote