2024-01-11 06:57:43 +02:00
|
|
|
#!/usr/bin/env sh
|
2024-01-12 02:42:17 +02:00
|
|
|
|
2024-01-14 23:05:53 +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
|
2024-01-11 06:57:43 +02:00
|
|
|
base_dir="/app"
|
|
|
|
else
|
|
|
|
source="${BASH_SOURCE}"
|
|
|
|
base_dir=$(dirname $(dirname "$source"))
|
|
|
|
fi
|
2023-02-15 01:21:36 +02:00
|
|
|
|
|
|
|
echo "Checking environment..."
|
2024-01-11 02:08:57 +02:00
|
|
|
script=scripts/preinstall
|
|
|
|
node "$base_dir/$script"
|
2023-02-15 01:21:36 +02:00
|
|
|
|
|
|
|
echo "Preparing the database..."
|
2024-01-11 02:08:57 +02:00
|
|
|
script=scripts/postinstall
|
|
|
|
node "$base_dir/$script"
|
2023-02-15 01:21:36 +02:00
|
|
|
|
|
|
|
echo "Starting..."
|
2024-01-11 02:08:57 +02:00
|
|
|
script=src/
|
|
|
|
node "$base_dir/$script"
|