Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (17 sloc) 0.467 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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/haproxy-$PORT"

if [ ! -e "$NEW_SERVICE_DIR" ]; then
  mkdir -p "$NEW_SERVICE_DIR"
  ln -s ../../haproxy-run $NEW_SERVICE_DIR/run
  ln -s ../../check-port $NEW_SERVICE_DIR/check
  echo "created haproxy service $NEW_SERVICE_DIR"
else
  echo "haproxy service $NEW_SERVICE_DIR already exists" >&2
  exit 1
fi
Something went wrong with that request. Please try again.