Skip to content

Commit

Permalink
move to a SWIFT_USER_PASSWORD variable if the user wants to set a dif…
Browse files Browse the repository at this point in the history
…ferent password for the default users in the proxy-server.conf file
  • Loading branch information
Curtis Collicutt committed Mar 10, 2016
1 parent 0b786f7 commit 2122e7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion files/proxy-server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ use = egg:swift#gatekeeper
[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
account_autocreate = true
10 changes: 5 additions & 5 deletions files/startmain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ if [ ! -z "${SWIFT_STORAGE_URL_SCHEME}" ]; then
grep "storage_url_scheme" /etc/swift/proxy-server.conf
fi

if [ ! -z "${SWIFT_SET_PASSWORDS}" ]; then
if [ ! -z "${SWIFT_USER_PASSWORD}" ]; then
echo "Setting passwords in /etc/swift/proxy-server.conf"
PASS=`pwgen 12 1`
sed -i -e "s/user_admin_admin = admin .admin .reseller_admin/user_admin_admin = $PASS .admin .reseller_admin/g" /etc/swift/proxy-server.conf
sed -i -e "s/user_test_tester = testing .admin/user_test_tester = $PASS .admin/g" /etc/swift/proxy-server.conf
sed -i -e "s/user_test2_tester2 = testing2 .admin/user_test2_tester2 = $PASS .admin/g" /etc/swift/proxy-server.conf
sed -i -e "s/user_test_tester3 = testing3/user_test_tester3 = $PASS/g" /etc/swift/proxy-server.conf
sed -i -e "s/user_admin_admin = admin .admin .reseller_admin/user_admin_admin = ${SWIFT_USER_PASSWORD} .admin .reseller_admin/g" /etc/swift/proxy-server.conf
sed -i -e "s/user_test_tester = testing .admin/user_test_tester = ${SWIFT_USER_PASSWORD} .admin/g" /etc/swift/proxy-server.conf
sed -i -e "s/user_test2_tester2 = testing2 .admin/user_test2_tester2 = ${SWIFT_USER_PASSWORD} .admin/g" /etc/swift/proxy-server.conf
sed -i -e "s/user_test_tester3 = testing3/user_test_tester3 = ${SWIFT_USER_PASSWORD}/g" /etc/swift/proxy-server.conf
grep "user_test" /etc/swift/proxy-server.conf
fi

Expand Down

0 comments on commit 2122e7c

Please sign in to comment.