I forgot to add following behind "done":
cp -sr "$MASTERSERVER/*" "$SERVERDIR"
Also SERVERDIR needs to be replaced by $SERVERDIR after the second find
command.
Am 05.08.2011 15:39, schrieb Ulrich Block:
Untested code:
#!/bin/bash
# enter the maindir
MASTERSERVER='/absolute/path/tfmain'
# enter the targetdir
SERVERDIR='/absolute/path/tf1'
EXCLUDE='valve\|overviews/\|scripts/\|media/\|particles/\|gameinfo.txt\|steam.inf\|/sound/\|steam_appid.txt\|/hl2/\|/overviews/\|/resource/\|/sprites/'
cd $MASTERSERVER
find -type f -name "*.vdf" -o -name "*.cfg" -o -name "*.gam" -o -name
"*.txt" -o -name "*.db" | grep -v "$EXCLUDE" | sed -e 's/\.\///g' |
while read LINE; do
FOLDER=`dirname "$LINE"`
if [ ! -d "$SERVERDIR/$FOLDER" ]; then
mkdir -p "$SERVERDIR/$FOLDER"
fi
find "SERVERDIR/$LINE" -type l -delete > /dev/null 2>&1
if [ ! -f "SERVERDIR/$LINE" ]; then
cp "$MASTERSERVER/$LINE" "SERVERDIR/$LINE" > /dev/null 2>&1
fi
done
Am 05.08.2011 15:25, schrieb Claudio Beretta:
depending on how much you are going to mod the servers, you can even run
multiple servers from the same path
there are several convars you can set to specify files and dirs
different
from the default (IE: motdfile motd27025.txt)
write cvarlist and search for "file" "dir" "path" to find all of them
If you want to symlink, I'd say everything exept cfg and addons.
On Fri, Aug 5, 2011 at 3:15 PM, Peter
Reinhold<[email protected]>wrote:
Hi all,
Just wondering if it is safe to symlink datafiles across multiple TF2
servers, so I only have to update a single instance, instead of many?
Anyone have any experience on this, maybe even a small shellscript
to do
it?
/Peter
______________________________**_________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/**mailman/listinfo/hlds_linux<http://list.valvesoftware.com/mailman/listinfo/hlds_linux>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list
archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux