feat: add various infrastructure check and automation scripts

This commit is contained in:
2026-11-15 17:17:41 -05:00
parent 336b7759d0
commit b301aa3ece
232 changed files with 8274 additions and 298 deletions

View File

@@ -0,0 +1,34 @@
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 "1. Booting wineprefix..."
wineboot -u
wineserver -w
echo "2. Wineprefix booted."
echo "3. Starting Setup.exe /SILENT /NOCANCEL..."
wine /opt/fs25/install/Setup.exe /SILENT /NOCANCEL
wineserver -w
echo "4. Setup.exe completed with code $?!"
"""
sftp = ssh.open_sftp()
with sftp.open("/opt/game-servers/fs25/do_install.sh", "w") as f:
f.write(script)
sftp.close()
ssh.exec_command("chmod 777 /opt/game-servers/fs25/do_install.sh; docker cp /opt/game-servers/fs25/do_install.sh gameseed-farming-simulator-25:/opt/fs25/do_install.sh")
ssh.close()
print("Uploaded do_install.sh")