@geekbeer/minion 3.6.3 → 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 +7 -5
package/package.json
CHANGED
package/win/minion-cli.ps1
CHANGED
|
@@ -901,9 +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
|
-
|
|
905
|
-
|
|
906
|
-
|
|
904
|
+
Invoke-Nssm install minion-cloudflared $cfExe
|
|
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"
|
|
907
909
|
# Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
|
|
908
910
|
# (NSSM runs as LocalSystem, whose ~ is C:\Windows\system32\config\systemprofile)
|
|
909
911
|
$cfEnvLines = @(
|
|
@@ -1373,8 +1375,8 @@ function Invoke-Configure {
|
|
|
1373
1375
|
if ($cfExe) {
|
|
1374
1376
|
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
|
1375
1377
|
if ($isAdmin) {
|
|
1376
|
-
|
|
1377
|
-
Invoke-Nssm
|
|
1378
|
+
Invoke-Nssm install minion-cloudflared $cfExe
|
|
1379
|
+
Invoke-Nssm set minion-cloudflared AppParameters "tunnel run"
|
|
1378
1380
|
# Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
|
|
1379
1381
|
$cfEnvLines = @(
|
|
1380
1382
|
"USERPROFILE=$TargetUserProfile",
|