-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy_configs.sh
49 lines (36 loc) · 1.01 KB
/
copy_configs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
cp -rv /vagrant/cookbooks/swift/files/default/etc/* /etc/
if grep -e "export SAIO_BLOCK_DEVICE=/srv/swift-disk" /home/vagrant/.bashrc > /dev/null;
then
echo "Not modifying .bashrc"
else
cat <<EOF >> /home/vagrant/.bashrc
export SAIO_BLOCK_DEVICE=/srv/swift-disk
EOF
fi
if grep -e "export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf" /home/vagrant/.bashrc > /dev/null;
then
echo "Not modifying .bashrc"
else
cat <<EOF >> /home/vagrant/.bashrc
export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf
EOF
fi
if grep -e "export PATH=${PATH}:/home/vagrant/bin" /home/vagrant/.bashrc > /dev/null;
then
echo "Not modifying .bashrc"
else
cat <<EOF >> /home/vagrant/.bashrc
export PATH=${PATH}:/home/vagrant/bin
EOF
fi
if grep -e "export ST_AUTH=http://192.168.11.33:8080/auth/v1.0" /home/vagrant/.bashrc > /dev/null;
then
echo "Not modifying .bashrc"
else
cat <<EOF >> /home/vagrant/.bashrc
export ST_AUTH=http://192.168.11.33:8080/auth/v1.0
export ST_USER=test:tester
export ST_KEY=testing
EOF
fi