Guest User

Untitled

a guest
Jan 22nd, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # deinmasteruser muss auf den eigenen Masteruser angepasst werden
  4.  
  5. MASTERDIR="/home/deinmasteruser/masterserver/css"
  6. find /home/*/server/*/*/orangebox/ -maxdepth 1 -type d -name "cstrike" | sed 's/orangebox\/cstrike//g' | while read DIR; do
  7. USER=`echo $DIR | awk -F '/' '{print $3}'`
  8. echo "Found old CSS Installation $DIR and moving it"
  9. su -c "rm -rf $DIR/css/" $USER
  10. su -c "mkdir -p $DIR/css/" $USER
  11. mv $DIR/orangebox/* $DIR/css/
  12. su -c "rm -rf $DIR/orangebox/" $USER
  13. echo "removing outdated symlinks in $DIR"
  14. find -L $DIR/ -type l -delete
  15. echo "Creating new Symlinks in $DIR"
  16. su -c "cp -sr $MASTERDIR/* $DIR/ > /dev/null 2>&1" $USER
  17. done
Add Comment
Please, Sign In to add comment