sendsignals 946 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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-Provided-By: LFS
  14. ### END INIT INFO
  15. . /lib/lsb/init-functions
  16. case "${1}" in
  17. stop)
  18. message="Sending all processes the TERM signal..."
  19. killall5 -15
  20. error_value=${?}
  21. sleep 3
  22. (exit ${error_value})
  23. evaluate_retval standard
  24. message="Sending all processes the KILL signal..."
  25. killall5 -9
  26. error_value=${?}
  27. sleep 3
  28. (exit ${error_value})
  29. evaluate_retval standard
  30. ;;
  31. *)
  32. echo "Usage: ${0} {stop}"
  33. exit 1
  34. ;;
  35. esac
  36. # End /etc/init.d/sendsignals