Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (18 sloc) 510 Bytes
#!/bin/bash -e
SERVICE_DIR=$(dirname $0)/service
PORT=$1
HAPROXY_PORT=$2
if [ -z "$PORT" ]; then
echo "usage: $0 port_number haproxy_port" >&2
exit 2
fi
NEW_SERVICE_DIR="$SERVICE_DIR/varnish-$PORT-$HAPROXY_PORT"
if [ ! -e "$NEW_SERVICE_DIR" ]; then
mkdir -p "$NEW_SERVICE_DIR"
ln -s ../../varnish-run $NEW_SERVICE_DIR/run
ln -s ../../check-port $NEW_SERVICE_DIR/check
echo "created varnish service $NEW_SERVICE_DIR"
else
echo "varnish service $NEW_SERVICE_DIR already exists" >&2
exit 1
fi
Something went wrong with that request. Please try again.