sam-cli — deploy
sam-cli.sh is a pure POSIX sh (busybox-compatible) wrapper around luna-send
for the webOS SAM daemon. It runs on the target board (no bash there — only
busybox ash), and can also drive the board remotely via --host/$SAM_HOST.
Target
- Board:
root@172.26.123.126(LG webOS TV, aarch64) - Destination:
/home/root/sam-cli scpdoes not work (the TV has nosftp-server) — use the base64 pipe below.
Deploy
# from this directory
base64 -w0 sam-cli.sh | ssh -o BatchMode=yes root@172.26.123.126 \
'base64 -d > /home/root/sam-cli && chmod +x /home/root/sam-cli && md5sum /home/root/sam-cli'
# verify checksum matches the local file
md5sum sam-cli.sh
Do not use ssh -tt for the transfer — the pty echoes the piped input and
corrupts the file. -tt is only for running commands afterwards.
Why /home/root?
/usr/local/bindoes not exist on this build./usroverlay is 100% full (30.8M/30.8M) — nothing can be written there./home/rootis persistent with ~197M free.
Post-deploy notes
/home/rootis not inPATH(/usr/bin:/bin:/usr/sbin:/sbin). Call by full path, orexport PATH=/usr/bin:/bin:/usr/sbin:/sbin:/home/root.- The board has no jq — the script's
--idsand JSON-merge fallbacks are built in;--prettydegrades to raw JSON. luna-sendreplies can take several seconds — keep the default--timeout 30or raise it.
Smoke test (read-only)
ssh -tt root@172.26.123.126 "/home/root/sam-cli running --ids"
ssh -tt root@172.26.123.126 "/home/root/sam-cli list --ids | wc -l"