@tshering: Huh. That works well enough for detecting nickel, though.
Are there multiple ksmhome.sh processes running?
Is the actual name correct, or is it eaten by a shell name or something?
pkill probably only checks the name of the actual binary, while pidof/pgrep can match the full command line. I'll fix the test

.