Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

keeping the keep-alive scripts in git for easier deployment.

  • Loading branch information...
commit d4929959e9557e2cd7d0c9c81af83904fa974d91 1 parent 41a24ea
@dyoo dyoo authored
View
7 keep-alive-scripts/is_dead.rkt
@@ -0,0 +1,7 @@
+#lang racket/base
+
+;; exits with 1 if the system thinks the local web server is down.
+(require net/url)
+(with-handlers ([exn:fail:network? (lambda (exn) (exit 1))])
+ (get-pure-port (string->url "http://localhost:8000/"))
+ (exit 0))
View
9 keep-alive-scripts/keep_alive.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+/home/ubuntu/racket/bin/racket /home/ubuntu/is_dead.rkt
+if [ $? -eq "1" ];
+then
+ /home/ubuntu/startup.sh
+else
+ :
+fi
Please sign in to comment.
Something went wrong with that request. Please try again.