Browse code

change stack to $USER

Chmouel Boudjnah authored on 2011/11/02 09:07:43
Showing 1 changed files
... ...
@@ -637,20 +637,10 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]];then
637 637
     for d in ${s}/{1..4} /etc/swift /etc/swift/{object,container,account}-server \
638 638
         ${SWIFT_LOCATION}/{1..4}/node/sdb1 /var/run/swift ;do
639 639
         [[ -d $d ]] && continue
640
-        sudo install -g stack -o stack -d $d
640
+        sudo install -o ${USER} -d $d
641 641
     done
642 642
 
643 643
     sudo chown -R stack: ${SWIFT_LOCATION}/{1..4}/node
644
-    
645
-    # Adjust rc.local to always have a /var/run/swift on reboot
646
-    # created and chown to our user.
647
-    # TODO (chmou): We may not have a "exit 0"
648
-    sudo sed -i '/^exit 0/d' /etc/rc.local
649
-cat <<EOF | sudo tee -a /etc/rc.local
650
-mkdir -p /var/run/swift
651
-chown stack: /var/run/swift
652
-exit 0
653
-EOF
654 644
 
655 645
    # Add rsync file
656 646
    sed -e "s,%SWIFT_LOCATION%,$SWIFT_LOCATION," $FILES/swift-rsyncd.conf | sudo tee /etc/rsyncd.conf