From 11375f74fce6bb55548588fe3e4e268a72408975 Mon Sep 17 00:00:00 2001 From: Exide Date: Mon, 24 Mar 2025 01:51:32 +0300 Subject: [PATCH] Update start.ps1 --- start.ps1 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/start.ps1 b/start.ps1 index 15d58f4..9af5214 100644 --- a/start.ps1 +++ b/start.ps1 @@ -1 +1,27 @@ -Write-Host "Hello world" +$ErrorActionPreference = 'Stop' + +$homeServerIp = "192.168.1.106" + +while ($true) { + Write-Host "1. SSH" -ForegroundColor Yellow + Write-Host "2. VNC tunnel [5901->5901]" -ForegroundColor Yellow + Write-Host "3. Deploy ConfigMeta API" -ForegroundColor Yellow + Write-Host "4. Deploy ConfigMeta Web App" -ForegroundColor Yellow + Write-Host "5. SSH to OpenVPN Azure VM" -ForegroundColor Yellow + + $input_secured = Read-Host "Select (def. 1)" -AsSecureString + $input = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($input_secured)) + Write-Host + + switch ($input) { + 1 { ssh exide@$homeServerIp -p 60022; break; } + 2 { ssh -L 5901:localhost:5901 exide@$homeServerIp -p 60022; break; } + 3 { ssh -L 5901:localhost:5901 exide@$homeServerIp -p 60022 -t 'cd ~/repos/configmaker-reborn/ConfigPro.Api/ && ./deploy.sh'; break; } + 4 { ssh -L 5901:localhost:5901 exide@$homeServerIp -p 60022 -t 'cd ~/repos/configpro-app-rework/ && ./deploy.sh'; break; } + 5 { ssh exide@20.91.223.192; break; } + default { ssh exide@$homeServerIp -p 60022; break; } + } + + pause + Write-Host +}