DiscordTickets/scripts/start.sh

25 lines
515 B
Bash
Raw Normal View History

#!/usr/bin/env sh
2024-01-12 02:42:17 +02:00
if [ "$PTERODACTYL" = "true" ]; then
rm -rf /home/container/app
cp -R /app /home/container/
base_dir="/home/container/app"
elif [ "$DOCKER" = "true" ]; then
base_dir="/app"
else
source="${BASH_SOURCE}"
base_dir=$(dirname $(dirname "$source"))
fi
echo "Checking environment..."
2024-01-11 02:08:57 +02:00
script=scripts/preinstall
node "$base_dir/$script"
echo "Preparing the database..."
2024-01-11 02:08:57 +02:00
script=scripts/postinstall
node "$base_dir/$script"
echo "Starting..."
2024-01-11 02:08:57 +02:00
script=src/
node "$base_dir/$script"