#!/bin/sh set -e DATADIR="/srv/znc" # This pattern is used because ZNC needs to write to this config, but k8s # mounts secrets as read-only. Sorry normal Docker users... mkdir -p $DATADIR/configs cp /bootstrap/configs/znc.conf $DATADIR/configs/znc.conf if [ -f /bootstrap/tls/znc.key ] && [ -f /bootstrap/tls/znc.crt ]; then cat /bootstrap/tls/znc.key /bootstrap/tls/znc.crt > /srv/znc/tls/znc.pem fi if [ "$ZNC_DEBUG" = "true" ]; then ZNC_DEBUG="--debug" else ZNC_DEBUG="" fi /opt/znc/bin/znc \ --foreground \ $ZNC_DEBUG \ --datadir "$DATADIR"