summaryrefslogtreecommitdiffstats
path: root/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh
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/update_gluster_vol.sh
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/update_gluster_vol.sh')
-rw-r--r--gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh b/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh
index dfb891d..9e9c60e 100644
--- a/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh
+++ b/gluster-s3object/CentOS/docker-gluster-s3/update_gluster_vol.sh
@@ -1,12 +1,14 @@
#!/bin/bash
# To update gluster volume name in swift-volumes, used by swift-gen-builders.service
-if [ -z "$GLUSTER_VOLUMES" ]; then
- echo "You need to set GLUSTER_VOLUMES env variable"
+if [[ -z "$GLUSTER_VOLUMES" || -z "$GLUSTER_USER" || -z "$GLUSTER_PASSWORD" ]]; then
+ echo "You need to set GLUSTER_VOLUMES, GLUSTER_USER, GLUSTER_PASSWORD env variable"
exit 1
else
echo "GLUSTER_VOLUMES env variable is set. Update in swift-volumes"
sed -i.bak '/^GLUSTER_VOLUMES=/s/=.*/='\""$GLUSTER_VOLUMES"\"'/' /etc/sysconfig/swift-volumes
+ sed -i.bak '/^GLUSTER_USER=/s/=.*/='\""$GLUSTER_USER"\"'/' /etc/sysconfig/swift-volumes
+ sed -i.bak '/^GLUSTER_PASSWORD=/s/=.*/='\""$GLUSTER_PASSWORD"\"'/' /etc/sysconfig/swift-volumes
fi
# Hand off to CMD