Skip to content

Instantly share code, notes, and snippets.

@1stvamp
Created September 3, 2012 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1stvamp/3610286 to your computer and use it in GitHub Desktop.
Save 1stvamp/3610286 to your computer and use it in GitHub Desktop.
Create a device on Server Density using densli
#!/bin/bash
# It is assumed at this point that we've just deployed a new server instance to AWS or similar via something like Puppet/Chef/Fabric/Salt etc., and this script is called like so:
# /path/to/create_device.sh $name $ipaddress $sdpassword
# Script will output the agent key required for setting up sd-agent
densli devices.add -q -d name=$1 -d ip=$2 --password=$3 -d group="Ze Cloud!" | \
sed -e 's/.*"agentKey": "\(.*\)".*/\1/'
return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment