Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # deinmasteruser muss auf den eigenen Masteruser angepasst werden
- MASTERDIR="/home/deinmasteruser/masterserver/css"
- find /home/*/server/*/*/orangebox/ -maxdepth 1 -type d -name "cstrike" | sed 's/orangebox\/cstrike//g' | while read DIR; do
- USER=`echo $DIR | awk -F '/' '{print $3}'`
- echo "Found old CSS Installation $DIR and moving it"
- su -c "rm -rf $DIR/css/" $USER
- su -c "mkdir -p $DIR/css/" $USER
- mv $DIR/orangebox/* $DIR/css/
- su -c "rm -rf $DIR/orangebox/" $USER
- echo "removing outdated symlinks in $DIR"
- find -L $DIR/ -type l -delete
- echo "Creating new Symlinks in $DIR"
- su -c "cp -sr $MASTERDIR/* $DIR/ > /dev/null 2>&1" $USER
- done
Add Comment
Please, Sign In to add comment