her.esy.fun/src/posts/0006-modern-irc/new-reverse-proxy.sh
2019-10-19 16:36:14 +02:00

13 lines
208 B
Bash

#!/usr/bin/env zsh
(($#<3)) && {
print "usage: $0:t SUB DOMAIN PORT"
exit 1
} >&2
SUB="$1"
DOMAIN="$2"
PORT="$3"
m4 -D SUB=$SUB -D DOMAIN=$DOMAIN -D PORT=$PORT reverse-proxy-template.m4 > $SUB.$DOMAIN