Simplify startup script

This commit is contained in:
Patrick Jentsch 2020-10-09 15:31:50 +02:00
parent 9e146c538b
commit 7a3a2ddf9a

View File

@ -1,10 +1,7 @@
#!/bin/bash
if [[ "$#" -eq 0 || "${1}" == "cqpserver" ]]; then
CQPSERVER_HOST="${CQPSERVER_HOST:-*}"
CQPSERVER_PASSWORD="${CQPSERVER_PASSWORD:-}"
CQPSERVER_USER="${CQPSERVER_USER:-anonymous}"
echo "host ${CQPSERVER_HOST};" > cqpserver.init
echo "user ${CQPSERVER_USER} \"${CQPSERVER_PASSWORD}\";" >> cqpserver.init
echo "host ${CQPSERVER_HOST:-*};" > cqpserver.init
echo "user ${CQPSERVER_USER:-anonymous} \"${CQPSERVER_PASSWORD:-}\";" >> cqpserver.init
fi
if [[ "$#" -eq 0 ]]; then