Permalink
Browse files

Add mizuno

  • Loading branch information...
1 parent 1bdf89e commit 1899a8de121648872df61b4d163fc7b3cf43cf9e @purcell committed Feb 11, 2013
Showing with 32 additions and 0 deletions.
  1. +21 −0 add-mizuno
  2. +11 −0 mizuno-run
View
21 add-mizuno
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+
+SERVICE_DIR=$(dirname $0)/service
+PORT=$1
+
+if [ -z "$PORT" ]; then
+ echo "usage: $0 port_number" >&2
+ exit 2
+fi
+
+NEW_SERVICE_DIR="$SERVICE_DIR/mizuno-$PORT"
+
+if [ ! -e "$NEW_SERVICE_DIR" ]; then
+ mkdir -p "$NEW_SERVICE_DIR"
+ ln -s ../../mizuno-run $NEW_SERVICE_DIR/run
+ ln -s ../../check-port $NEW_SERVICE_DIR/check
+ echo "created mizuno service $NEW_SERVICE_DIR"
+else
+ echo "mizuno service $NEW_SERVICE_DIR already exists" >&2
+ exit 1
+fi
View
11 mizuno-run
@@ -0,0 +1,11 @@
+#!/bin/bash -e
+
+. ../../bootstrap
+PORT=$(basename $(pwd)|awk -F- '{print $2}')
+
+if [ -z "$PORT" ]; then
+ echo "usage: $0 port" 1>&2;
+ exit 2
+fi
+
+cd $APP_DIR && exec mizuno -E production -p $PORT --reloadable 2>&1

0 comments on commit 1899a8d

Please sign in to comment.