#!/bin/bash # $Id$ #%rlevels: 0:k 6:k #%start: #%stop: 50 #deps #%needs: #%before: #%after: source /etc/conf.d/rc source ${rc_functions} [[ -e /etc/conf.d/sendsignals ]] && source /etc/conf.d/sendsignals opts="" if [[ -n ${IGNORED_PROCS} ]] then for proc in ${IGNORED_PROCS} do pids=$(pidof ${proc}) if [[ -n ${pids} ]] then for id in ${pids} do opts="${opts} -o ${id}" done fi done fi rc_print "Sending all processes the TERM signal ..." killall5 -15 ${opts} error_value=$? # # Sleep for a while to allow processes to receive and process the TERM # signal. The heavier your system is loaded, the higher it should sleep # here. # sleep 3 if [ "$error_value" = 0 ] then print_status success else print_status failure fi rc_print "Sending all processes the KILL signal ..." killall5 -9 ${opts} error_value=$? # # Increase sleep amount on heavier loaded systems. # sleep 3 if [ "$error_value" = 0 ] then print_status success else print_status failure fi update_svcstatus $1 splash svc_stopped "$(basename $0)" 0