tuulos / ringo

Distributed key-value storage a'la Amazon Dynamo

This URL has Read+Write access

ringo / create_node.sh
100755 11 lines (7 sloc) 0.203 kb
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
 
if [ -z $1 ]; then
echo "Usage: create_node.sh [host] [ringo_data]"
exit 1
fi
 
node=`dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | cut -d ' ' -f 1`
ssh $1 "mkdir -p $2/$node"