sendsignals 866 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin $rc_base/init.d/sendsignals
  4. #
  5. # Description : Sendsignals Script
  6. #
  7. # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
  8. #
  9. # Version : 00.00
  10. #
  11. # Notes :
  12. #
  13. ########################################################################
  14. . /etc/sysconfig/rc
  15. . ${rc_functions}
  16. case "${1}" in
  17. stop)
  18. boot_mesg "Sending all processes the TERM signal..."
  19. killall5 -15
  20. error_value=${?}
  21. sleep ${KILLDELAY}
  22. if [ "${error_value}" = 0 ]; then
  23. echo_ok
  24. else
  25. echo_failure
  26. fi
  27. boot_mesg "Sending all processes the KILL signal..."
  28. killall5 -9
  29. error_value=${?}
  30. sleep ${KILLDELAY}
  31. if [ "${error_value}" = 0 ]; then
  32. echo_ok
  33. else
  34. echo_failure
  35. fi
  36. ;;
  37. *)
  38. echo "Usage: ${0} {stop}"
  39. exit 1
  40. ;;
  41. esac
  42. # End $rc_base/init.d/sendsignals