feat: self-host Hobbs Family Organizer (Shield TV dashboard) on hf-pdocker-02:8340
- tv app/Hobbs-Family-Organizer-Self-Hosted-v1.0.0: release bundle (Next.js app + Shield APK v1.4 + source) - compose/hf-pdocker-02/hobbs-organizer: override (local-disk secrets, watchtower off), .env (port 8340), Shield provisioning script - CLAUDE.md: service tree + internal ports Trusted-LAN mode. Secrets live only on .100 /var/lib/hobbs-organizer/secrets (not in git). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E9NnVEico3WvFxLyjy1iW3
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Device,
|
||||
|
||||
[string]$AdbPath = "adb"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if (Test-Path -LiteralPath $AdbPath -PathType Leaf) {
|
||||
$resolvedAdb = (Resolve-Path -LiteralPath $AdbPath).Path
|
||||
} else {
|
||||
$command = Get-Command -Name $AdbPath -CommandType Application -ErrorAction SilentlyContinue
|
||||
if ($null -eq $command) {
|
||||
throw "ADB was not found. Install Android platform-tools or pass -AdbPath with the full path to adb.exe."
|
||||
}
|
||||
$resolvedAdb = $command.Source
|
||||
}
|
||||
|
||||
& $resolvedAdb connect $Device | Out-Null
|
||||
if ((& $resolvedAdb -s $Device get-state) -ne "device") {
|
||||
throw "The Shield is not connected and authorized."
|
||||
}
|
||||
|
||||
& $resolvedAdb -s $Device shell "run-as com.dayline.tv sh -c 'rm -f files/base_url files/.base_url.new files/access_token files/.access_token.new files/allow_insecure_http files/.allow_insecure_http.new'"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "The local configuration could not be removed."
|
||||
}
|
||||
|
||||
& $resolvedAdb -s $Device shell am force-stop com.dayline.tv
|
||||
& $resolvedAdb -s $Device shell am start -W -n com.dayline.tv/.MainActivity
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "The organizer could not be relaunched."
|
||||
}
|
||||
|
||||
Write-Host "Restored the hosted Site configuration on $Device. The legacy service_token was not changed."
|
||||
Reference in New Issue
Block a user