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