mirror of
https://github.com/benjamin-wilson/public-pool-ui.git
synced 2025-04-09 20:29:02 +02:00
15 lines
390 B
Bash
15 lines
390 B
Bash
#!/bin/sh
|
|
|
|
if [ ! -e "/etc/Caddyfile" ]; then
|
|
sed -i "s#%%LOGLEVEL%%#${LOGLEVEL:-INFO}#g" /etc/Caddyfile.tpl
|
|
sed -i "s#%%LOGFORMAT%%#${LOGFORMAT:-json}#g" /etc/Caddyfile.tpl
|
|
mv /etc/Caddyfile.tpl /etc/Caddyfile
|
|
else
|
|
rm -f /etc/Caddyfile.tpl
|
|
fi
|
|
|
|
echo "Starting UI on port 80"
|
|
echo "Logs output: ${LOGLEVEL:-INFO} (${LOGFORMAT:-json})"
|
|
|
|
exec caddy run --config /etc/Caddyfile
|