@geekbeer/minion 3.6.2 → 3.6.3
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 +13 -0
package/package.json
CHANGED
package/win/minion-cli.ps1
CHANGED
|
@@ -904,6 +904,13 @@ function Invoke-Setup {
|
|
|
904
904
|
$cfConfigDir = Join-Path $TargetUserProfile '.cloudflared'
|
|
905
905
|
$cfConfigPath = Join-Path $cfConfigDir 'config.yml'
|
|
906
906
|
Invoke-Nssm install minion-cloudflared $cfExe "tunnel run --config `"$cfConfigPath`""
|
|
907
|
+
# Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
|
|
908
|
+
# (NSSM runs as LocalSystem, whose ~ is C:\Windows\system32\config\systemprofile)
|
|
909
|
+
$cfEnvLines = @(
|
|
910
|
+
"USERPROFILE=$TargetUserProfile",
|
|
911
|
+
"HOME=$TargetUserProfile"
|
|
912
|
+
)
|
|
913
|
+
Invoke-Nssm set minion-cloudflared AppEnvironmentExtra ($cfEnvLines -join "`n")
|
|
907
914
|
Invoke-Nssm set minion-cloudflared Start SERVICE_DEMAND_START
|
|
908
915
|
Invoke-Nssm set minion-cloudflared DisplayName "Minion Cloudflared"
|
|
909
916
|
Invoke-Nssm set minion-cloudflared Description "Cloudflare Tunnel for Minion"
|
|
@@ -1368,6 +1375,12 @@ function Invoke-Configure {
|
|
|
1368
1375
|
if ($isAdmin) {
|
|
1369
1376
|
$cfConfigPath = Join-Path $cfConfigDir 'config.yml'
|
|
1370
1377
|
Invoke-Nssm install minion-cloudflared $cfExe "tunnel run --config `"$cfConfigPath`""
|
|
1378
|
+
# Set USERPROFILE/HOME so cloudflared resolves ~/.cloudflared/ to the target user's profile
|
|
1379
|
+
$cfEnvLines = @(
|
|
1380
|
+
"USERPROFILE=$TargetUserProfile",
|
|
1381
|
+
"HOME=$TargetUserProfile"
|
|
1382
|
+
)
|
|
1383
|
+
Invoke-Nssm set minion-cloudflared AppEnvironmentExtra ($cfEnvLines -join "`n")
|
|
1371
1384
|
Invoke-Nssm set minion-cloudflared Start SERVICE_AUTO_START
|
|
1372
1385
|
Invoke-Nssm set minion-cloudflared DisplayName "Minion Cloudflared"
|
|
1373
1386
|
Invoke-Nssm set minion-cloudflared Description "Cloudflare Tunnel for Minion"
|