summaryrefslogtreecommitdiffstats
path: root/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
diff options
context:
space:
mode:
authorHumble Devassy Chirammal <humble.devassy@gmail.com>2017-07-31 12:29:37 +0000
committerGitHub <noreply@github.com>2017-07-31 12:29:37 +0000
commite5da35f7f83b2be0b78aadc1056a5dd9d77f4835 (patch)
treea854f78176e4406ed65455e778059ce9a46dc0e3 /gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
parent4757dd977452d15baae91d46a7895cd3d5b7863e (diff)
parentb214fff44235d8f011fcd9de12a9d2735deb50ee (diff)
downloadgluster-e5da35f7f83b2be0b78aadc1056a5dd9d77f4835.tar.gz
gluster-e5da35f7f83b2be0b78aadc1056a5dd9d77f4835.tar.bz2
gluster-e5da35f7f83b2be0b78aadc1056a5dd9d77f4835.tar.xz
gluster-e5da35f7f83b2be0b78aadc1056a5dd9d77f4835.zip
Merge pull request #50 from vredara/s3_auth_add_user
Added S3 authentication changes
Diffstat (limited to 'gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user')
-rwxr-xr-xgluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user13
1 files changed, 13 insertions, 0 deletions
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user b/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
new file mode 100755
index 0000000..59eb1b2
--- /dev/null
+++ b/gluster-s3object/CentOS/docker-gluster-s3/gluster-swift-add-user
@@ -0,0 +1,13 @@
+#!/bin/bash
+if [ "$#" -lt 3 ]; then
+ echo "Incorrect args. invoke gluster-swift-add-user $GLUSTER_USER $GLUSTER_PASSWORD $GLUSTER_VOLUMES"
+ exit 1
+else
+ GLUSTER_USER=$1
+ GLUSTER_PASSWORD=$2
+ GLUSTER_VOLUMES=$(echo $3 | cut -d" " -f1)
+ sleep 5
+ gswauth-prep -A http://0.0.0.0:8080/auth -K gswauthkey
+ gswauth-add-account -K gswauthkey $GLUSTER_VOLUMES
+ gswauth-add-user -K gswauthkey -a $GLUSTER_VOLUMES $GLUSTER_USER $GLUSTER_PASSWORD
+fi