kito2
www.masteria.net
Hello,
I have 3 scripts which I would like to mix and make just one but I am a bit confused on how to make them work all, so I come here asking for help. Maybe some of you could help me on this:
This script is used to start the server and to save a screenlog of the output, minimizing on a screen:
This script auto-restarts the server if it crashes:
This script should "screen" and save the output and an error file when it closes (needed gdb):
The idea is to have a simple code which would restart the server when it crashes, save the log file somewhere and also use the gdb application in order to debug when it crashes and save the log.
Could someone help me? Thanks!
@StreamSide
I have 3 scripts which I would like to mix and make just one but I am a bit confused on how to make them work all, so I come here asking for help. Maybe some of you could help me on this:
This script is used to start the server and to save a screenlog of the output, minimizing on a screen:
Code:
#!/bin/sh
#
# Startup and signals management script for TheForgottenServer
#
case "$1" in
start)
ulimit -c unlimited
echo -n "Starting ... "
screen -LAdmS root ./tfs
echo "done."
;;
stop)
echo -n "Shutting down: "
killall -TERM tfs
echo "done."
;;
kill)
echo -n "Killing ... "
killall -KILL tfs
echo "done."
;;
*)
echo "Usage: $0 {start|stop|kill}"
exit 1
esac
exit 0
This script auto-restarts the server if it crashes:
Code:
#!/bin/bash
ulimit -c unlimited
while true; do ./theforgottenserver; done
This script should "screen" and save the output and an error file when it closes (needed gdb):
Code:
#!/bin/bash
ulimit -c unlimited
while true; do screen -LAdmS root ./tfs --log-file "output.txt" "error.txt"; done
The idea is to have a simple code which would restart the server when it crashes, save the log file somewhere and also use the gdb application in order to debug when it crashes and save the log.
Could someone help me? Thanks!
@StreamSide