2019-07-25 07:06:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
NAME="Synchronet BBS"
|
|
|
|
|
|
|
|
export PATH=$PATH:${SBBSEXEC}
|
|
|
|
|
|
|
|
if [ ! -e "${SBBSCTRL}/sbbs.ini" ]; then
|
|
|
|
echo "* Installing SBBS ctrl files into ${SBBSCTRL}"
|
2019-08-14 10:56:48 +00:00
|
|
|
cp -Ras ${SBBSCTRL}.orig/* ${SBBSCTRL}
|
2019-07-25 07:06:05 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "${SBBSCTRL}/../nodes/node1" ]; then
|
2021-01-13 13:45:02 +00:00
|
|
|
[ ! -d "${SBBSCTRL}/../nodes" ] && mkdir ${SBBSCTRL}/../nodes
|
2019-07-25 07:06:05 +00:00
|
|
|
echo "* Installing SBBS nodes files into ${SBBSCTRL}/../nodes"
|
2020-11-26 10:38:01 +00:00
|
|
|
cp -Ra ${SBBSCTRL}/../nodes.orig/* ${SBBSCTRL}/../nodes/
|
2019-08-14 10:56:48 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e "${SBBSCTRL}/../text/answer.msg" ]; then
|
|
|
|
echo "* Installing SBBS text files into ${SBBSCTRL}/../text"
|
|
|
|
cp -Ras ${SBBSCTRL}/../text.orig/* ${SBBSCTRL}/../text/
|
2019-07-25 07:06:05 +00:00
|
|
|
fi
|
|
|
|
|
2021-01-14 06:43:48 +00:00
|
|
|
if [ -r ${SBBSCTRL}/doorparty-connector.users ]; then
|
|
|
|
${SBBSCTRL}../exec/doorparty.sh
|
|
|
|
fi
|
|
|
|
|
2019-07-25 07:06:05 +00:00
|
|
|
if [ -x /usr/sbin/zerotier-one -a -n "${ENABLE_ZT}" ]; then
|
|
|
|
echo "* Starting ZeroTier"
|
|
|
|
mkdir /dev/net && mknod /dev/net/tun -m 666 c 10 200
|
|
|
|
/usr/sbin/zerotier-one -d
|
|
|
|
fi
|
|
|
|
|
2020-06-21 04:01:30 +00:00
|
|
|
if [ -n "$1" ]; then
|
|
|
|
echo "* Starting [$@]"
|
|
|
|
exec "$@"
|
|
|
|
else
|
|
|
|
# Start Supervisord
|
|
|
|
echo "* Starting supervisord"
|
2021-01-13 13:45:02 +00:00
|
|
|
mkdir /run/sshd
|
2020-06-21 04:01:30 +00:00
|
|
|
exec /usr/bin/supervisord -nc /etc/supervisor/supervisord.conf
|
|
|
|
fi
|