31 lines
700 B
Bash
Executable File
31 lines
700 B
Bash
Executable File
#!/bin/sh
|
|
|
|
meta_dir="docker_meta"
|
|
|
|
if test ! -f "velocity.jar" -o "$VELOCITY_UPDATE_ON_START" == "true"; then
|
|
update_velocity
|
|
else
|
|
echo "Skipping Velocity download"
|
|
fi
|
|
|
|
if test ! -f "$meta_dir/config_done"; then
|
|
if test "$VELOCITY_SECRET" = "REPLACE_THIS_WITH_A_RANDOM_SECRET"; then
|
|
echo "Refusing to configure Velocity with insecure secret"
|
|
exit 1
|
|
fi
|
|
|
|
echo "$VELOCITY_SECRET" > forwarding.secret
|
|
|
|
echo "Running velocity to generate configs"
|
|
|
|
echo shutdown | java -jar velocity.jar
|
|
sed -i 's/player-info-forwarding-mode.*$/player-info-forwarding-mode = "MODERN"/g' velocity.toml
|
|
|
|
mkdir -p "$meta_dir" && touch "$meta_dir/config_done"
|
|
else
|
|
echo "Setup is done"
|
|
fi
|
|
|
|
echo "> $@"
|
|
exec "$@"
|