sendsignals.xml 833 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <sect1 id="ch07-sendsignals">
  2. <title>Creating the sendsignals script</title>
  3. <para>Create the <filename>/etc/init.d/sendsignals</filename> script by running
  4. the following command:</para>
  5. <para><screen><userinput>cat &gt; /etc/init.d/sendsignals &lt;&lt; "EOF"</userinput>
  6. #!/bin/sh
  7. # Begin /etc/init.d/sendsignals
  8. #
  9. # Include the functions declared in the /etc/init.d/functions file
  10. #
  11. source /etc/init.d/functions
  12. #
  13. # Send all the remaining processes the TERM signal
  14. #
  15. echo -n "Sending all processes the TERM signal..."
  16. /sbin/killall5 -15
  17. evaluate_retval
  18. #
  19. # Send all the remaining process (after sending them the TERM signal
  20. # before) the KILL signal.
  21. #
  22. echo -n "Sending all processes the KILL signal..."
  23. /sbin/killall5 -9
  24. evaluate_retval
  25. # End /etc/init.d/sendsignals
  26. <userinput>EOF</userinput></screen></para>
  27. </sect1>