Skip to content

Instantly share code, notes, and snippets.

@jsinai
Last active May 19, 2017 15:23
Show Gist options
  • Save jsinai/56dff764ba085fd08a232ffcfefba39b to your computer and use it in GitHub Desktop.
Save jsinai/56dff764ba085fd08a232ffcfefba39b to your computer and use it in GitHub Desktop.
How to send a file to a BrightSign over a local network. Requires the Diagnostic Web Server to be configured. Suitable for an operating system that supports bash, like macos or ubuntu. Usage: send2bs <brightsign player ip address> <file to send> admin:<serial>.
#!/bin/bash
# Usage: send2bs <brightsign player ip address> <file to send> admin:<serial>.
# The last argument is the credentials, which can be omitted if you turn off authentication on the initial page
# of the diagnostic web server (DWS) by clicking "change password" > Remove Password.
remote=$1
filename=$2
if [ -z ${3} ]; then creds=""; else creds="--digest -u $3"; fi
cmd="curl -X POST --data-binary \"@${filename}\" ${creds} --header \"Allow-Overwrite: true\" --header \"Content-Type: application/octet-stream\" \"http://${remote}/upload.xml?rp=sd&r=sd&t=${filename}\" | grep -q '<result>SUCCESS</result>'"
if eval $cmd; then
echo Sent
else
echo Failed
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment