Merge "Creates SWIFT_DATA_DIR if it does not exist"
This commit is contained in:
commit
d1549d624d
@ -309,6 +309,7 @@ function configure_swift {
|
|||||||
local node_number
|
local node_number
|
||||||
local swift_node_config
|
local swift_node_config
|
||||||
local swift_log_dir
|
local swift_log_dir
|
||||||
|
local user_group
|
||||||
|
|
||||||
# Make sure to kill all swift processes first
|
# Make sure to kill all swift processes first
|
||||||
swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
|
swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
|
||||||
@ -505,10 +506,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local user_group=$(id -g ${STACK_USER})
|
||||||
|
sudo install -d -o ${STACK_USER} -g ${user_group} ${SWIFT_DATA_DIR}
|
||||||
|
|
||||||
local swift_log_dir=${SWIFT_DATA_DIR}/logs
|
local swift_log_dir=${SWIFT_DATA_DIR}/logs
|
||||||
rm -rf ${swift_log_dir}
|
sudo rm -rf ${swift_log_dir}
|
||||||
mkdir -p ${swift_log_dir}/hourly
|
sudo install -d -o ${STACK_USER} -g adm ${swift_log_dir}/hourly
|
||||||
sudo chown -R ${STACK_USER}:adm ${swift_log_dir}
|
|
||||||
|
|
||||||
if [[ $SYSLOG != "False" ]]; then
|
if [[ $SYSLOG != "False" ]]; then
|
||||||
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
|
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
|
||||||
|
Loading…
Reference in New Issue
Block a user