Browse files autostarts redis-server guarantees that redis-server is running before starting the web
server: if it's already running, then nothing will be done.
  • Loading branch information...
1 parent 34b4561 commit 488427f4da784d2a15bd0720e11624a31f159b38 @jpaugh jpaugh committed Feb 18, 2012
Showing with 10 additions and 2 deletions.
  1. +2 −0 README
  2. +8 −2
@@ -33,6 +33,8 @@ Run the following command to start the webserver:
$ ./
+This also starts redis-server, if that's not already running.
By default, the website is hosted at http://localhost:8000, but if you need to
change the port number, use the PORT environment variable. Note that PORT must
be either a number or unset.
@@ -1,2 +1,8 @@
-exec lein run -m testify.core
+APPDIR=$(dirname $0)
+if [[ -z $(pidof redis-server) ]]; then
+ echo "Starting Redis server"
+ redis-server $APPDIR/redis/redis.conf >/dev/null&
+echo "Starting web server"
+exec lein run -m testify.core

0 comments on commit 488427f

Please sign in to comment.