Hey, I'm trying to make a script to be run by VirtualMin to stop my xbtt torrent tracker when the server is shutdown/restarted. I have a script called stop-xbtt.sh and in it I have Code: #!/bin/sh cd /home/xbtt/Tracker/ kill 'cat xbt_tracker.pid' now, I can't get the kill 'cat xbt_tracker.pid' to work. All I wanted it to do is read the PID number in the xbt_tracker.pid (which works with cat) and pass it onto kill PS. Server is Ubuntu 8.04
kill sends TERM signal so there is a possibility not to kill your process. I use pkill command without knowing the PID of the process and after a sleep i use pkill -9 just to be sure. something like this: Code: pkill apache sleep 3 pkill -9 apache