this shit works yo
This commit is contained in:
@@ -17,6 +17,8 @@ try { $PSStyle.OutputRendering = 'Host' } catch {}
|
||||
|
||||
. "$PSScriptRoot/lib.ps1"
|
||||
|
||||
$Pass = Get-DefaultPassword $Pass
|
||||
|
||||
function Get-DeployScript {
|
||||
param($DeployPreferred, $DeployTmp, $RemoteTmp, $RemotePath, $RestartFlag)
|
||||
return @"
|
||||
|
||||
@@ -9,7 +9,7 @@ BIN=/root/.bin/wakey
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command "$BIN"
|
||||
procd_set_param command "$BIN" http --host :: --port 12012
|
||||
procd_set_param respawn 5 1 0
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# Shared functions for wakey scripts
|
||||
|
||||
function Get-DefaultPassword {
|
||||
param([string]$Password)
|
||||
|
||||
if ($Password) {
|
||||
return $Password
|
||||
}
|
||||
|
||||
$pwPath = Join-Path (Split-Path -Parent $PSScriptRoot) 'ar_data/pw'
|
||||
if (-not (Test-Path $pwPath)) {
|
||||
throw "Password not provided and default file not found: $pwPath"
|
||||
}
|
||||
|
||||
return (Get-Content -Raw $pwPath).Trim()
|
||||
}
|
||||
|
||||
function Invoke-Ext {
|
||||
param($Exe, $Arguments, $Label)
|
||||
$displayArgs = $Arguments.Clone()
|
||||
|
||||
@@ -16,6 +16,8 @@ $ErrorActionPreference = "Stop"
|
||||
|
||||
. "$PSScriptRoot/lib.ps1"
|
||||
|
||||
$password = Get-DefaultPassword $password
|
||||
|
||||
# Build tests and capture output
|
||||
Write-Host "Building tests for $Package..." -ForegroundColor Cyan
|
||||
|
||||
|
||||
Reference in New Issue
Block a user