summaryrefslogtreecommitdiff
path: root/docker-run.sh
blob: f147b779ae40f48f78992ce88de5b9874bcec5ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -eu

if [ ! -f travelynx.conf ]
then
	echo "The configuration file is missing"
	exit 1
fi

if [ \
	"${TRAVELYNX_MAIL_DISABLE:-0}" -eq 0 \
	-a "${TRAVELYNX_MAIL_HOST:-unset}" != "unset" \
]
then
	export EMAIL_SENDER_TRANSPORT=SMTP
	export EMAIL_SENDER_TRANSPORT_HOST=${TRAVELYNX_MAIL_HOST}
	export EMAIL_SENDER_TRANSPORT_PORT=${TRAVELYNX_MAIL_PORT:-25}
fi

perl index.pl database migrate

exec /usr/local/bin/hypnotoad -f index.pl