Maybe if your sig wasn't so long (and silly to boot!) I'd be more inclined to help you. :devil: But the first thing to do is to make the CGI script run the same shell that you use on the command line, and see what happens.
The simplest solution is to use the killall command followed by the process name. killall removes the need to go looking for process id's and all the parsing associated with it.
IE, killall smaug
If that script is run by the same user as the owner of the process it will only kill the the smaug processes owned by that user, if run as root it will kill any smaug processes running on that computer.