35 lines
599 B
Bash
Executable File
35 lines
599 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CONF="/tmp/botz.yaml"
|
|
|
|
if [ -z ${DEBUG} ]; then
|
|
_DEBUG="false"
|
|
else
|
|
_DEBUG="true"
|
|
fi
|
|
|
|
if [ -z ${BASE_URI} ]; then
|
|
echo "Missing BASE_URI environment variable."
|
|
exit 1
|
|
fi
|
|
|
|
cat > ${CONF} <<-EOF
|
|
base_uri: ${BASE_URI}
|
|
debug: ${_DEBUG}
|
|
log:
|
|
level: ${DEBUG_LEVEL:-INFO}
|
|
syslog: false
|
|
http:
|
|
bind_addr:
|
|
- "0.0.0.0"
|
|
port: 3003
|
|
EOF
|
|
|
|
echo "--------------------------------------------"
|
|
echo " STARTING WITH CONFIG:"
|
|
echo "--------------------------------------------"
|
|
cat ${CONF}
|
|
echo "--------------------------------------------"
|
|
|
|
z_app -c ${CONF}
|