Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 22 lines (17 sloc) 0.467 kb
d8c41ed Steve Purcell Explicitly use bash for all 'run' scripts, to prevent issues with rvm no...
authored
1 #!/bin/bash -e
07476cc Steve Purcell Initial revision
authored
2
3 SERVICE_DIR=$(dirname $0)/service
4 PORT=$1
5
6 if [ -z "$PORT" ]; then
7 echo "usage: $0 port_number" >&2
8 exit 2
9 fi
10
11 NEW_SERVICE_DIR="$SERVICE_DIR/mongrel-$PORT"
12
13 if [ ! -e "$NEW_SERVICE_DIR" ]; then
14 mkdir -p "$NEW_SERVICE_DIR"
15 ln -s ../../mongrel-run $NEW_SERVICE_DIR/run
05e9b41 Steve Purcell Use netcat (nc) to ping backend ports in order to check if servers are r...
authored
16 ln -s ../../check-port $NEW_SERVICE_DIR/check
07476cc Steve Purcell Initial revision
authored
17 echo "created mongrel service $NEW_SERVICE_DIR"
18 else
19 echo "mongrel service $NEW_SERVICE_DIR already exists" >&2
20 exit 1
21 fi
Something went wrong with that request. Please try again.