gluon-supernode-docker/fastd/entry-point.sh

27 lines
699 B
Bash
Executable File

#!/bin/sh
umask 600
set -x
cat >>/etc/fastd/fastd_generated.conf <<EOF
secret "${FASTD_SECRET_KEY}";
log level ${FASTD_LOG_LEVEL};
mtu ${FASTD_MTU};
bind 0.0.0.0:${FASTD_PORT};
peer limit ${FASTD_PEER_LIMIT};
EOF
if [ "${FASTD_INTERFACE}" ] ; then
echo "interface \"${FASTD_INTERFACE}\";" >>/etc/fastd/fastd_generated.conf
else
echo "interface \"fastd-`hostname`\";" >>/etc/fastd/fastd_generated.conf
fi
if [ "${FASTD_DONT_VERIFY_PEERS}" = "1" ] ; then
printf 'on verify sync "true";\n' >>/etc/fastd/fastd_generated.conf
fi
for method in ${FASTD_METHODS} ; do
echo "method \"${method}\";" >>/etc/fastd/fastd_generated.conf
done
exec /usr/bin/fastd --config /etc/fastd/fastd.conf