using MoonlightServers.Daemon.Models; namespace MoonlightServers.Daemon.Services; public class ServerConfigurationService { public async Task GetRuntimeConfigurationAsync(string uuid) { return new RuntimeConfiguration( new RuntimeLimitsConfig(400, null, 4096, null), new RuntimeStorageConfig("local", [], 10240), new RuntimeTemplateConfig( "ghcr.io/pterodactyl/yolks:java_21", "java -jar -Xmx{{SERVER_MEMORY}}M server.jar", "stop", ["Done"] ), new RuntimeNetworkConfig( [], null, null, new RuntimePortConfig("0.0.0.0", 25565), [ new RuntimePortConfig("0.0.0.0", 25565) ] ), new RuntimeEnvironmentConfig( new Dictionary() { { "testy", "ytset" } }, new Dictionary() { { "SERVER_MEMORY", "4096" }, {"MINECRAFT_VERSION", "latest"}, {"SERVER_JARFILE", "server.jar"} } ) ); } public async Task GetInstallConfigurationAsync(string uuid) { return new InstallConfiguration( "bash", "installer", await File.ReadAllTextAsync("/home/chiara/Documents/daemonScripts/install.sh") ); } }