Hey,
A friend of mine is having a few problems with his linux server.. its up and running fine, the only problem we are having is with mods.
Only one mod is installed on the server (finmod) and whatever we try we can't get the server to start with the mod. We're both sure that its something totally stupid, as we had the same problem before but forgot to back the server up when migrating to a more powerful machine.
Server cfg:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
!/bin/bash
#
# ofpserver: Operation Flashpoint Linux dedicated server control script
# (c) 2003 BIStudio
# OFP binary version must be 1.92 or later!
#
#=======================================================================
#======== CONFIGURATION PARAMETERS ========
#======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========
#=======================================================================
OFP_DIR=/opt/ofp
CONFIG=${OFP_DIR}/server.cfg
PORT=2302
PIDFILE=/var/run/ofp_server.${PORT}.pid
RUNFILE=/var/run/ofp_server.${PORT}.run
LOGFILE=${OFP_DIR}/log.${PORT}.txt
SERVER=${OFP_DIR}/server
#=======================================================================
case "$1" in
start)
if [ -f ${RUNFILE} ]; then
$0 stop
fi
echo "Starting OFP server..."
# file to mark we want server running...
echo "go" >${RUNFILE}
# launch the background watchdog process to run the server
nohup </dev/null >/dev/null $0 watchdog &
;;
stop)
echo "Stopping OFP server..."
if [ -f ${RUNFILE} ]; then
# ask watcher process to exit by deleting its runfile...
rm -f ${RUNFILE}
fi
# and terminate OFP server process
if [ -f ${PIDFILE} ]; then
kill -TERM $(< ${PIDFILE})
if [ -f ${PIDFILE} ]; then
rm -f ${PIDFILE}
fi
fi
;;
status)
if [ -f ${RUNFILE} ]; then
echo "Server should be running..."
else
echo "Server should not be running..."
fi
if [ -f ${PIDFILE} ]; then
PID=$(< ${PIDFILE})
echo "PID file exists (PID=${PID})..."
if [ -f /proc/${PID}/cmdline ]; then
echo "Server process seems to be running..."
fi
fi
;;
check)
echo -n "OFP directory: ${OFP_DIR} "
if [ -d ${OFP_DIR} ]; then
echo "OK"
else
echo "MISSING!"
fi
echo -n "Server executable: ${SERVER} "
if [ -x ${SERVER} ]; then
echo "OK"
else
echo "ERROR!"
fi
echo "Port number: ${PORT}"
echo -n "Config file: ${CONFIG} "
if [ -f ${CONFIG} ]; then
echo "OK"
else
echo "MISSING!"
fi
echo "PID file: ${PIDFILE}"
echo "RUN file: ${RUNFILE}"
;;
restart)
$0 stop
$0 start
;;
watchdog)
# this is a background watchdog process. Do not start directly
while [ -f ${RUNFILE} ]; do
# launch the server..
cd ${OFP_DIR}
#MODS=finmod
echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..."
(export LD_LIBRARY_PATH=/opt/ofp/lib;${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG}
-port=${PORT} -pid=${PIDFILE})
${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} -mod=finmod
if [ -f ${RUNFILE} ]; then
echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..."
unset LD_LIBRARY_PATH
sleep 5s
else
echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating"
unset LD_LIBRARY_PATH
fi
done
;;
*)
echo "$0 (start|stop|restart|status|check)"
;;
esac
So any pointers on getting the server to start with finmod ?