![xiabing.yao](/assets/img/avatar_default.png)
Use variables like SOURCE,TARGET in config-external.sh, so it will easy to modify in future. Closes-Bug: #1485710 Change-Id: I3880a2cbca8a80d36e84a797fcfb943e43b88bd5
19 lines
497 B
Bash
19 lines
497 B
Bash
#!/bin/bash
|
|
SOURCE="/opt/kolla/swift/swift.conf"
|
|
TARGET="/etc/swift/swift.conf"
|
|
SOURCE_ACCOUNT_SERVER="/opt/kolla/swift/account-server.conf"
|
|
TARGET_ACCOUNT_SERVER="/etc/swift/account-server.conf"
|
|
OWNER="swift"
|
|
|
|
if [[ -f "$SOURCE" ]]; then
|
|
cp $SOURCE $TARGET
|
|
chown ${OWNER}: $TARGET
|
|
chmod 0640 $TARGET
|
|
fi
|
|
|
|
if [[ -f "$SOURCE_ACCOUNT_SERVER" ]]; then
|
|
cp $SOURCE_ACCOUNT_SERVER $TARGET_ACCOUNT_SERVER
|
|
chown ${OWNER}: $TARGET_ACCOUNT_SERVER
|
|
chmod 0640 $TARGET_ACCOUNT_SERVER
|
|
fi
|