mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-01-26 17:09:44 +00:00
added check for existence of tailscale log
This commit is contained in:
@@ -503,6 +503,7 @@ if exist "%log_dir%\gpu_info_output.txt" (
|
||||
set "gpuInfo=GPU Info not found"
|
||||
)
|
||||
|
||||
if exist "%log_dir%\tailscale_status.txt" (
|
||||
rem Read the the content of tailscale log into vars
|
||||
set count=0
|
||||
for /f "tokens=* delims=" %%i in (%log_dir%\tailscale_status.txt) do (
|
||||
@@ -511,7 +512,7 @@ for /f "tokens=* delims=" %%i in (%log_dir%\tailscale_status.txt) do (
|
||||
if !count! equ 2 set hostName=%%i
|
||||
if !count! equ 3 set dnsName=%%i
|
||||
)
|
||||
|
||||
)
|
||||
rem Remove trailing period from dnsName if it exists
|
||||
if "!dnsName:~-1!"=="." set "dnsName=!dnsName:~0,-1!"
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ if %errorlevel%==0 (
|
||||
) else if errorlevel 1 (
|
||||
echo.
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Fetching Tailscale status...
|
||||
|
||||
rem Use the dynamic path based on %~dp0 to write to the logs folder
|
||||
powershell -command ^
|
||||
"$json = tailscale status --json | ConvertFrom-Json; " ^
|
||||
|
||||
Reference in New Issue
Block a user