what a plan! what an impl! this is ahh

This commit is contained in:
lda
2026-04-11 15:25:18 +07:00 Unverified
parent a36e9d058d
commit e2feaeab8c
43 changed files with 1090 additions and 1629 deletions
-14
View File
@@ -69,20 +69,6 @@ try {
Invoke-Scp -Local $localBin -Dest $destTmp -Pass $Pass -HostKey $HostKey -Port $Port -Quiet:$Quiet
Invoke-Scp -Local $localAgentBin -Dest $agentDestTmp -Pass $Pass -HostKey $HostKey -Port $Port -Quiet:$Quiet
# Push static assets
$localStatic = Join-Path $repoRoot "static"
if (Test-Path $localStatic) {
# Assuming RemotePath is like /root/.bin/wakey, we want /root/.bin/static
# So we push 'static' directory to /root/.bin/
$remoteDir = (Split-Path $RemotePath -Parent) -replace '\\', '/'
# Ensure remote dir exists (ssh mkdir -p)
Invoke-Ssh -Cmd "mkdir -p $remoteDir" -User $User -Remote $HostName -Pass $Pass -Port $Port -Quiet:$Quiet
# SCP -r static user@host:/root/.bin/
# Note: pscp/scp behavior: if dest is a dir, it copies the source dir INTO it.
Invoke-Scp -Local $localStatic -Dest "$User@${HostName}:$remoteDir/" -Pass $Pass -HostKey $HostKey -Port $Port -Quiet:$Quiet -Recurse
}
# Push deploy helper if exists
if (Test-Path $localDeploy) {
Invoke-Scp -Local $localDeploy -Dest "$User@${HostName}:$deployTmp" -Pass $Pass -HostKey $HostKey -Port $Port -Quiet:$Quiet
+2 -4
View File
@@ -5,13 +5,11 @@ START=99
USE_PROCD=1
NAME=wakey
# BIN=/root/.bin/wakey-agent
BIN=/root/.bin/wakey
BIN=/root/.bin/wakey-agent
start_service() {
procd_open_instance
# procd_set_param command "$BIN" serve
procd_set_param command "$BIN" http --host :: --port 12012
procd_set_param command "$BIN" serve
procd_set_param respawn 5 1 0
procd_set_param stdout 1
procd_set_param stderr 1
-6
View File
@@ -62,12 +62,6 @@ if (Test-Path $deploySrc) {
Set-Content -NoNewline -LiteralPath (Join-Path $rootDir "remote_deploy_wakey.sh") -Value $deployContent -Encoding UTF8
}
# Copy static assets
$staticSrc = Join-Path $root "static"
if (Test-Path $staticSrc) {
Copy-Item -Recurse $staticSrc (Join-Path $rootDir "static") -Force
}
# Copy all OpenWrt init scripts present in repo
Get-ChildItem (Join-Path $root 'scripts/init/openwrt') -File | ForEach-Object {
$dest = Join-Path $etcDir $_.Name