Another possibility would be to use pidof
it usually comes with most distributions. It will return you the PID of a given process by using it's name.
pidof process_name
This way you could store that information in a variable and execute kill -9
on it.
#!/bin/bash
pid=`pidof process_name`
kill -9 $pid