mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 04:52:59 +02:00
53 lines
929 B
Bash
53 lines
929 B
Bash
#!/bin/sh
|
|
########################################################################
|
|
# Begin $rc_base/init.d/sendsignals
|
|
#
|
|
# Description : Sendsignals Script
|
|
#
|
|
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
|
#
|
|
# Version : 00.00
|
|
#
|
|
# Notes :
|
|
#
|
|
########################################################################
|
|
|
|
. /etc/sysconfig/rc
|
|
. ${rc_functions}
|
|
|
|
case "${1}" in
|
|
stop)
|
|
boot_mesg "Sending all processes the TERM signal..." ${WARN}
|
|
killall5 -15
|
|
error_value=${?}
|
|
|
|
sleep ${KILLDELAY}
|
|
|
|
if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
|
|
echo_ok
|
|
else
|
|
echo_failure
|
|
fi
|
|
|
|
boot_mesg "Sending all processes the KILL signal..." ${ERR}
|
|
killall5 -9
|
|
error_value=${?}
|
|
|
|
sleep ${KILLDELAY}
|
|
|
|
if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
|
|
echo_ok
|
|
else
|
|
echo_failure
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: ${0} {stop}"
|
|
exit 1
|
|
;;
|
|
|
|
esac
|
|
|
|
# End $rc_base/init.d/sendsignals
|