#!/bin/bash
DIR=$(dirname "$(dirname "$(readlink -f "$0")")") || exit
CONF=${1:-caddy}
$DIR/bin/caddy adapt --config $DIR/conf/$CONF.conf --adapter caddyfile > caddy.json