test file because shit is broken
This commit is contained in:
parent
e411697aa4
commit
caf1401d5e
1 changed files with 14 additions and 0 deletions
14
server-test.py
Normal file
14
server-test.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
# Server IPMI details
|
||||||
|
IPMIHOST = "192.168.1.223"
|
||||||
|
IPMIUSER = "root"
|
||||||
|
IPMIPASS = "<password>"
|
||||||
|
|
||||||
|
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)
|
Loading…
Reference in a new issue