feat: add various infrastructure check and automation scripts
This commit is contained in:
28
scripts/run_fs25_install.py
Normal file
28
scripts/run_fs25_install.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import paramiko
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect("140.44.44.80", username="root", key_filename=r"C:\Users\Snarf\.ssh\id_ed25519_snarfnet", timeout=10)
|
||||
|
||||
script = """#!/bin/bash
|
||||
export DISPLAY=:1
|
||||
export WINEPREFIX=/home/nobody/.fs_server
|
||||
export WINEARCH=win64
|
||||
export WINEDLLOVERRIDES="mscoree=d"
|
||||
export WINEDEBUG=-all
|
||||
export USER=nobody
|
||||
|
||||
echo "Starting Setup.exe /SILENT /NOCANCEL..."
|
||||
wine /opt/fs25/install/Setup.exe /SILENT /NOCANCEL
|
||||
echo "Setup.exe completed with exit code: $?"
|
||||
"""
|
||||
|
||||
sftp = ssh.open_sftp()
|
||||
with sftp.open("/opt/game-servers/fs25/install_fs25.sh", "w") as f:
|
||||
f.write(script)
|
||||
sftp.close()
|
||||
|
||||
ssh.exec_command("chmod +x /opt/game-servers/fs25/install_fs25.sh")
|
||||
ssh.close()
|
||||
print("Saved install_fs25.sh successfully!")
|
||||
|
||||
Reference in New Issue
Block a user