summaryrefslogtreecommitdiffstats
path: root/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
blob: 0b4262b585c0230ecc63161fd51612c66ec52017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
if [ "$#" -lt 3 ]; then
	echo "Incorrect args. invoke gluster-swift-add-user $S3_USER $S3_PASSWORD $S3_ACCOUNT"
	exit 1
else
	S3_USER=$1
	S3_PASSWORD=$2
	S3_ACCOUNT=$(echo $3 | cut -d" " -f1)
	sleep 5
	gswauth-prep -A http://0.0.0.0:8080/auth -K gswauthkey
        gswauth-add-account -K gswauthkey $S3_ACCOUNT
	gswauth-add-user -K gswauthkey -a $S3_ACCOUNT $S3_USER $S3_PASSWORD
fi