Created
April 27, 2012 03:16
-
-
Save m3nd3s/2505380 to your computer and use it in GitHub Desktop.
Exemplo de Case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case $RET in | |
0) | |
# old daemon stopped | |
check_for_no_start log_end_msg | |
check_dev_null log_end_msg | |
if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then | |
log_end_msg 0 | |
else | |
log_end_msg 1 | |
fi | |
;; | |
1) | |
# daemon not running | |
log_progress_msg "(not running)" | |
log_end_msg 0 | |
;; | |
*) | |
# failed to stop | |
log_progress_msg "(failed to stop)" | |
log_end_msg 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment