feat(vault): add vault.snarfnet.net proxy host and topology docs
This commit is contained in:
19
scripts/run_insert_vault.py
Normal file
19
scripts/run_insert_vault.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import paramiko
|
||||
|
||||
client = paramiko.SSHClient()
|
||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
client.connect("140.44.4.71", username="root", key_filename=r"C:\Users\Snarf\.ssh\id_ed25519_snarfnet", timeout=10)
|
||||
|
||||
with open(r"c:\Users\Snarf\OneDrive\Desktop\code\SnarfCode\scripts\insert_vault_db.py", "r") as f:
|
||||
script_text = f.read()
|
||||
|
||||
cmd = f"cat << 'EOF' > /tmp/insert_vault.py\n{script_text}\nEOF\npython3 /tmp/insert_vault.py"
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
print("DB script output:", stdout.read().decode().strip(), stderr.read().decode().strip())
|
||||
|
||||
# Reload both NPM containers
|
||||
cmd = "for id in $(docker ps -q -f name=nginx-proxy-manager_app); do docker exec $id nginx -s reload; done"
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
print("Reload output:", stdout.read().decode().strip())
|
||||
|
||||
client.close()
|
||||
Reference in New Issue
Block a user