#! /bin/sh
#
# apache-functions	This file contains a replacement killproc
#	that does not use the KILL signal

# Hacked By: Manoj Kasichainula <manojk@io.com>

# A function to stop a program.
# Why does the default Red Hat version use the KILL signal??
killproc() {
	# Test syntax.
	if [ $# = 0 ]; then
		echo "Usage: killproc {program}"
		return 1
	fi

        # Save basename.
        base=`basename $1`

        # Find pid.
        pid=`pidofproc $base`

        # Kill it.
        if [ "$pid" != "" ] ; then
                echo -n "$base "
                kill $pid
	fi

        # Remove pid file if any.
        rm -f /var/run/$base.pid
}

