change stack to $USER
This commit is contained in:
parent
ab75f4becf
commit
a55b09d9e8
1 changed files with 1 additions and 11 deletions
12
stack.sh
12
stack.sh
|
@ -637,21 +637,11 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]];then
|
||||||
for d in ${s}/{1..4} /etc/swift /etc/swift/{object,container,account}-server \
|
for d in ${s}/{1..4} /etc/swift /etc/swift/{object,container,account}-server \
|
||||||
${SWIFT_LOCATION}/{1..4}/node/sdb1 /var/run/swift ;do
|
${SWIFT_LOCATION}/{1..4}/node/sdb1 /var/run/swift ;do
|
||||||
[[ -d $d ]] && continue
|
[[ -d $d ]] && continue
|
||||||
sudo install -g stack -o stack -d $d
|
sudo install -o ${USER} -d $d
|
||||||
done
|
done
|
||||||
|
|
||||||
sudo chown -R stack: ${SWIFT_LOCATION}/{1..4}/node
|
sudo chown -R stack: ${SWIFT_LOCATION}/{1..4}/node
|
||||||
|
|
||||||
# Adjust rc.local to always have a /var/run/swift on reboot
|
|
||||||
# created and chown to our user.
|
|
||||||
# TODO (chmou): We may not have a "exit 0"
|
|
||||||
sudo sed -i '/^exit 0/d' /etc/rc.local
|
|
||||||
cat <<EOF | sudo tee -a /etc/rc.local
|
|
||||||
mkdir -p /var/run/swift
|
|
||||||
chown stack: /var/run/swift
|
|
||||||
exit 0
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Add rsync file
|
# Add rsync file
|
||||||
sed -e "s,%SWIFT_LOCATION%,$SWIFT_LOCATION," $FILES/swift-rsyncd.conf | sudo tee /etc/rsyncd.conf
|
sed -e "s,%SWIFT_LOCATION%,$SWIFT_LOCATION," $FILES/swift-rsyncd.conf | sudo tee /etc/rsyncd.conf
|
||||||
sudo sed -i '/^RSYNC_ENABLE=false/ { s/false/true/ }' /etc/default/rsync
|
sudo sed -i '/^RSYNC_ENABLE=false/ { s/false/true/ }' /etc/default/rsync
|
||||||
|
|
Loading…
Reference in a new issue