2024-03-29 06:51:46 +01:00
|
|
|
# I'm so bad at bash scripting
|
2024-03-29 14:15:24 +01:00
|
|
|
cat << EOF
|
|
|
|
____ ______________ __
|
|
|
|
/ __ \/ _/ ___/ ___// /
|
|
|
|
/ / / // / \__ \\__ \/ /
|
|
|
|
/ /_/ // / ___/ /__/ /_/
|
|
|
|
/_____/___//____/____(_)
|
|
|
|
|
|
|
|
EOF
|
|
|
|
if [ ! -d data ]; then
|
|
|
|
echo '-------------'
|
|
|
|
echo 'Data folder not found. Did you set up a volume?'
|
|
|
|
echo '-------------'
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-03-29 20:12:14 +01:00
|
|
|
if [ -z "$(find data -mindepth 1 -maxdepth 1)" ]; then
|
2024-03-29 06:51:46 +01:00
|
|
|
echo '-------------'
|
2024-03-29 20:12:14 +01:00
|
|
|
echo 'Data directory is empty, copying template.'
|
2024-03-29 06:51:46 +01:00
|
|
|
echo '-------------'
|
2024-03-29 20:12:14 +01:00
|
|
|
cp -r data.template/* data/
|
2024-03-29 06:51:46 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo 'Starting...'
|
2024-03-29 20:12:14 +01:00
|
|
|
node src/index.js
|
2024-03-29 06:51:46 +01:00
|
|
|
echo 'Exiting...'
|
|
|
|
|