From 3f64411aedc5a461c6ef1c63aca35155785ea223 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 8 Mar 2022 12:42:04 +0100 Subject: [PATCH] cool startup scripts for remote debugging --- scripts/deploy.py | 10 +++++++++- scripts/{start_server.py => start_local.py} | 0 scripts/start_remote.py | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) rename scripts/{start_server.py => start_local.py} (100%) create mode 100644 scripts/start_remote.py diff --git a/scripts/deploy.py b/scripts/deploy.py index 2978047..48b720b 100644 --- a/scripts/deploy.py +++ b/scripts/deploy.py @@ -1,3 +1,11 @@ import shutil +import subprocess + +pluginPath = "out/artifacts/Sharehealth/Sharehealth.jar" + +# local server +shutil.copy2(pluginPath, "server/plugins") + +# remote server +subprocess.run(["scp", pluginPath, "minecraft@130.61.179.201:/home/minecraft/servers/flattest/plugins"]) -shutil.copy2("out/artifacts/Sharehealth/Sharehealth.jar", "server/plugins") diff --git a/scripts/start_server.py b/scripts/start_local.py similarity index 100% rename from scripts/start_server.py rename to scripts/start_local.py diff --git a/scripts/start_remote.py b/scripts/start_remote.py new file mode 100644 index 0000000..2c0f4e0 --- /dev/null +++ b/scripts/start_remote.py @@ -0,0 +1,3 @@ +import os + +os.system("ssh minecraft@130.61.179.201 'cd servers/flattest; ./start.sh'")