#!/bin/sh # Launcher for the Polaris emulator. # Place at /var/www/emulator/Emulator/target/emulator and chmod +x. # Update the JAR name to match the version built by `mvn clean package`. file_name_emulator=emulator.log current_time=$(date "+%H%M_%d-%m-%Y") file_name=$file_name_emulator.$current_time # Rotate the previous log mkdir -p /var/log/emu mv /var/log/emu/emulator.log /var/log/emu/$file_name 2>/dev/null || true # -Xmx4096m = 4 GB. 1 GB=1024, 2 GB=2048, 3 GB=3072, 4 GB=4096 java -Dfile.encoding=UTF8 -Xmx4096m \ -jar /var/www/emulator/Emulator/target/Habbo-*-jar-with-dependencies.jar \ >/var/log/emu/emulator.log