# # Hook function to gracefully shutdown the sshd service. # sshd_shutdown () { # stop the master daemon first /etc/rc.d/sshd stop # terminate the remaining sshd instances (ssh sessions) stat_busy "Closing ssh sessions" /bin/kill `/bin/pidof sshd` &>/dev/null stat_done # if some sshd processes still remain alive that is OK, # they will be killed later anyway return 0 } add_hook shutdown_start sshd_shutdown