From f1ed02aff1f704bc001bce9a0f323c3235a6eae5 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 13 Aug 2023 17:05:51 +0200 Subject: [PATCH] Created the mcdash.js app --- server/handler/apps/mcdash.js | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 server/handler/apps/mcdash.js diff --git a/server/handler/apps/mcdash.js b/server/handler/apps/mcdash.js new file mode 100644 index 0000000..ba3fc70 --- /dev/null +++ b/server/handler/apps/mcdash.js @@ -0,0 +1,38 @@ +module.exports = { + variables: { + software: "paper", + username: "CONSOLE", + password: "CONSOLE", + port: 25565, + panel: 7868, + version: "1.20.1", + }, + steps: [ + { + description: "Zugriff prüfen", + command: "if [ $EUID -ne 0 ]; then exit 1; fi" + }, + { + description: "Hash generieren", + command: "apt-get install apache2-utils -y && htpasswd -bnBC 10 \"\" {password} | tr -d ':\n' | sed 's/$2y/$2a/' > /tmp/.mchash && echo $RANDOM | md5sum | head -c 5 > /tmp/.mcinstance" + }, + { + description: "Spigot installieren", + command: "curl -sSL https://create.mcdash.gnmyt.dev/install.sh | bash -s -- \"spigot\" " + + "\"{username}: $(cat /tmp/.mchash)\" \"$(cat /tmp/.mcinstance)\" \"{port}\" \"{panel}\" \"{version}\" \"PowerTools\" \"17\"", + condition: "software=Spigot", + }, + { + description: "Paper installieren", + command: "curl -sSL https://create.mcdash.gnmyt.dev/install.sh | bash -s -- \"paper\" " + + "\"{username}: $(cat /tmp/.mchash)\" \"$(cat /tmp/.mcinstance)\" \"{port}\" \"{panel}\" \"{version}\" \"PowerTools\" \"17\"", + condition: "software=Paper", + }, + { + description: "Purpur installieren", + command: "curl -sSL https://create.mcdash.gnmyt.dev/install.sh | bash -s -- \"purpur\" " + + "\"{username}: $(cat /tmp/.mchash)\" \"$(cat /tmp/.mcinstance)\" \"{port}\" \"{panel}\" \"{version}\" \"PowerTools\" \"17\"", + condition: "software=Purpur" + } + ] +} \ No newline at end of file