Skip to content

Instantly share code, notes, and snippets.

@saml
Created May 9, 2011 18:40
Show Gist options
  • Save saml/963087 to your computer and use it in GitHub Desktop.
Save saml/963087 to your computer and use it in GitHub Desktop.
tr
#!/bin/bash
if (( $# < 2 ))
then
echo "Usage: $0 path-to-activate host:port [dryrun|activate] [username:password]"
exit 1
fi
path="$1"
host="$2"
cmd="dryrun"
if (( $# > 2 ))
then
cmd="$3"
fi
cred="admin:admin"
if (( $# > 3 ))
then
cred="$4"
fi
curl -u "$cred" -X POST -F"path=$path" -F"cmd=$cmd" "http://$host/etc/replication/treeactivation.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment