#!/bin/sh

proc_killer() {
    local PROC
    local TIMEOUT
    local counter
    PROC="$1"
    TIMEOUT=$2
    counter=0
    while [ $counter -lt $TIMEOUT ]; do
        sleep 10
        counter=$(( counter + 10 ))
    done
    kill -2 $PROC >/dev/null 2>& 1
    sleep 10
    kill -15 $PROC >/dev/null 2>& 1
    sleep 10
    kill -9 $PROC >/dev/null 2>& 1
}
