@geekbeer/minion 3.6.4 → 3.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/win/minion-cli.ps1 +5 -5
package/package.json
CHANGED
package/win/minion-cli.ps1
CHANGED
|
@@ -901,10 +901,11 @@ function Invoke-Setup {
|
|
|
901
901
|
# Register cloudflared as NSSM service (config will be set by 'configure --setup-tunnel')
|
|
902
902
|
Invoke-Nssm stop minion-cloudflared
|
|
903
903
|
Invoke-Nssm remove minion-cloudflared confirm
|
|
904
|
-
$cfConfigDir = Join-Path $TargetUserProfile '.cloudflared'
|
|
905
|
-
$cfConfigPath = Join-Path $cfConfigDir 'config.yml'
|
|
906
904
|
Invoke-Nssm install minion-cloudflared $cfExe
|
|
907
|
-
|
|
905
|
+
# Use "tunnel run" without --config; cloudflared defaults to ~/.cloudflared/config.yml
|
|
906
|
+
# which resolves correctly via USERPROFILE env var set below.
|
|
907
|
+
# (NSSM mangles --flag to -flag, so we avoid passing double-dash flags entirely)
|
|
908
|
+
Invoke-Nssm set minion-cloudflared AppParameters "tunnel run"
|
|
908
909
|
# Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
|
|
909
910
|
# (NSSM runs as LocalSystem, whose ~ is C:\Windows\system32\config\systemprofile)
|
|
910
911
|
$cfEnvLines = @(
|
|
@@ -1374,9 +1375,8 @@ function Invoke-Configure {
|
|
|
1374
1375
|
if ($cfExe) {
|
|
1375
1376
|
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
|
1376
1377
|
if ($isAdmin) {
|
|
1377
|
-
$cfConfigPath = Join-Path $cfConfigDir 'config.yml'
|
|
1378
1378
|
Invoke-Nssm install minion-cloudflared $cfExe
|
|
1379
|
-
Invoke-Nssm set minion-cloudflared AppParameters "tunnel run
|
|
1379
|
+
Invoke-Nssm set minion-cloudflared AppParameters "tunnel run"
|
|
1380
1380
|
# Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
|
|
1381
1381
|
$cfEnvLines = @(
|
|
1382
1382
|
"USERPROFILE=$TargetUserProfile",
|