Skip to content

Commit

Permalink
provision device script
Browse files Browse the repository at this point in the history
  • Loading branch information
mwunderl committed Mar 25, 2022
1 parent 493e130 commit 3779e54
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
10 changes: 9 additions & 1 deletion util-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Run these scripts from any directory.

## provision-device.sh

Provision a device.

$ ./provision-device.sh <device-name>

## register-camera.sh

Register a camera.
Expand Down Expand Up @@ -52,4 +58,6 @@ Re-add the model to the application after updating the descriptor file. Before u

## view-logs.sh

View logs for the current application instance (from `application-id.txt`).
View logs for the current application instance (from `application-id.txt`).

my-app$ ./view-logs.sh
11 changes: 11 additions & 0 deletions util-scripts/provision-device.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -eo pipefail
if [[ $# -eq 1 ]] ; then
DEVICE_NAME=$1
else
echo "Usage: ./register-device.sh <device-name>"
exit 1
fi
CERTIFICATE_BUNDLE=certificates-omni_${DEVICE_NAME}.zip
aws panorama provision-device --name ${DEVICE_NAME} --output text --query Certificates | base64 --decode > ${CERTIFICATE_BUNDLE}
echo "Created certificate bundle ${CERTIFICATE_BUNDLE}"

0 comments on commit 3779e54

Please sign in to comment.