From 6a752d6fb2f6995ad37c8501a1ad8b5a89d15dae Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 20 Jan 2016 04:11:02 +0000 Subject: [PATCH] made cosmetic changes to codepot-mon-httpd --- codepot/sbin/codepot-mon-httpd | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/codepot/sbin/codepot-mon-httpd b/codepot/sbin/codepot-mon-httpd index f6252ffa..9b0e4ab5 100644 --- a/codepot/sbin/codepot-mon-httpd +++ b/codepot/sbin/codepot-mon-httpd @@ -19,8 +19,13 @@ then DAEMON=1 fi +exit_requested=no -while true +trap 'exit_requested=yes' SIGINT SIGHUP SIGTERM + +[ "${DAEMON}" = "1" ] && logger -t "$0" "Started" + +while [ "${exit_requested}" = "no" ] do sleep 5 @@ -54,3 +59,5 @@ END { } ' done + +[ "${DAEMON}" = "1" ] && logger -t "$0" "Exited"