sendsignals 996 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. # Begin /etc/init.d/sendsignals
  3. ### BEGIN INIT INFO
  4. # Provides: sendsignals
  5. # Required-Start:
  6. # Should-Start:
  7. # Required-Stop: $local_fs swap localnet
  8. # Should-Stop:
  9. # Default-Start:
  10. # Default-Stop: 0 6
  11. # Short-Description: Attempts to kill remaining processes.
  12. # Description: Attempts to kill remaining processes.
  13. # X-LFS-Default-Start:
  14. # X-LFS-Default-Stop: S60
  15. # X-LFS-Provided-By: LFS
  16. ### END INIT INFO
  17. . /lib/lsb/init-functions
  18. case "${1}" in
  19. stop)
  20. message="Sending all processes the TERM signal..."
  21. killall5 -15
  22. error_value=${?}
  23. sleep 3
  24. (exit ${error_value})
  25. evaluate_retval standard
  26. message="Sending all processes the KILL signal..."
  27. killall5 -9
  28. error_value=${?}
  29. sleep 3
  30. (exit ${error_value})
  31. evaluate_retval standard
  32. ;;
  33. *)
  34. echo "Usage: ${0} {stop}"
  35. exit 1
  36. ;;
  37. esac
  38. # End /etc/init.d/sendsignals