From caf1401d5e8ae2e348ca8070b756c89dd3a1e2b5 Mon Sep 17 00:00:00 2001 From: Tristan Smith Date: Thu, 21 Mar 2024 20:26:58 -0400 Subject: [PATCH] test file because shit is broken --- server-test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server-test.py diff --git a/server-test.py b/server-test.py new file mode 100644 index 0000000..7f52482 --- /dev/null +++ b/server-test.py @@ -0,0 +1,14 @@ +import subprocess + +# Server IPMI details +IPMIHOST = "192.168.1.223" +IPMIUSER = "root" +IPMIPASS = "" + +def execute_ipmi_command(command): + full_command = f"ipmitool -I lanplus -H {IPMIHOST} -U {IPMIUSER} -P {IPMIPASS} {command}" + print(f"Executing command: {full_command}") # Print the full command to debug + result = subprocess.run(full_command, shell=True, capture_output=True, text=True) + print(result.stdout) + if result.stderr: + print(result.stderr)