Quote Originally Posted by Selbie View Post
file: cod2_lnxded_autoBoot
Code:
#!/bin/bash
#
# call of duty 2 auto restart script.
# including a logfile relocater
#
# pluginLoader
export LD_PRELOAD="/usr/lib/cod2/libcod2_1_2.so"
#
# Settings:
cd "/home/games/cod2/server/"
MOD="tdm"
CONSOLE_FILE="console_mp_server.log"
SCREEN_FILE="screenlog.0"
OUTPUT_DIR=".console/"
#
# DO NOT EDIT BELOW
CONSOLE_FILE_PATH=".callofduty2/$MOD/$CONSOLE_FILE"
CONSOLE_FILE_PATH_DST=$OUTPUT_DIR$CONSOLE_FILE
SCREEN_FILE_PATH_DST=$OUTPUT_DIR$SCREEN_FILE
TMP_OUTPUT_FILE="autoboot.log"

if [ ! -d $OUTPUT_DIR ]; then
	mkdir -p $OUTPUT_DIR
fi
#
#
for count in {1..10} ; do
	"./cod2_lnxded" "$@"
	if [ -f $TMP_OUTPUT_FILE ]; then
		rm $TMP_OUTPUT_FILE
	fi
	if [ -f $CONSOLE_FILE_PATH ]; then
		mv $CONSOLE_FILE_PATH "$CONSOLE_FILE_PATH_DST$count"
		echo "moved $CONSOLE_FILE_PATH to $CONSOLE_FILE_PATH_DST$count"
	fi
	if [ -f $SCREEN_FILE ]; then
		tail -n 2000 $SCREEN_FILE > "$SCREEN_FILE_PATH_DST$count"
		echo "copied last 2k lines from $SCREEN_FILE to $SCREEN_FILE_PATH_DST$count"
	fi	
	echo "Times Crached:" $count >> autoboot.log
	echo "Restarting the server..."
	sleep 5;
done
exit 1
./cod2_lnxded_autoBoot +set dedicated 2 +map mp_toujane
(Your startupline for normal cod2)
I still have some random server stops, so im trying to use this script. Somehow I get an error that i can't preload the libcod.so file
Code:
ERROR: ld.so: object '/home/olger/HIGHJUMP/libcod2_1_0_newest.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
However, when I use the "normal" start, there is no error at all. What can be the error? All directories are set correctly and cod2_lnxded and the autoboot are in the same folder as well