This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

use -k option for timeout.

git-svn-id: svn+ssh://svn.nemui.org/home/sugi/data/svnroot/mozshot/trunk@200 8f797353-fa07-0410-9347-d4c221381513
  • Loading branch information...
sugi
sugi committed Aug 9, 2010
1 parent f3fd0e3 commit 7a46ef29051e1ef47ad63549c49bafe6e748a4bb
Showing with 3 additions and 1 deletion.
  1. +3 −1 examples/check-ts.sh
View
@@ -4,7 +4,7 @@
pid=`< /home/sugi/www/mozshot/ts.pid`
restart=false
-if ! timeout 2 ruby ~/www/mozshot/utils/ping-ts.rb druby://:7524; then
+if ! timeout -k 1 2 ruby ~/www/mozshot/utils/ping-ts.rb druby://:7524; then
echo "ts.rb not respond ping, restarting..."
restart=true
fi
@@ -28,3 +28,5 @@ if [ "$restart" = "true" ]; then
sleep 1
kill -KILL $pid > /dev/null 2>&1
fi
+
+exit 0

0 comments on commit 7a46ef2

Please sign in to comment.