mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 22:31:18 +00:00
Make core file handling be part of docker compose.
Remove the shutdown handling hack when the server was crashing on exit. Add a proper stop option now that seinding SIGTERM will properly shut the server down.
This commit is contained in:
parent
e8d0893569
commit
9d0cb5f7bf
1 changed files with 6 additions and 13 deletions
|
@ -14,21 +14,17 @@ cyan="\e[36m"
|
|||
function report() {
|
||||
echo
|
||||
echo -e "${yellow}========================================== error.log =========================================="
|
||||
find "${HOME}" -name error.log -exec head {} \; -exec rm -f {} \;
|
||||
find "${HOME}" -name error.log -exec head {} \; -exec tail {} \; -exec rm -f {} \;
|
||||
echo
|
||||
echo -e "${yellow}========================================== script*.log ========================================"
|
||||
find "${HOME}" -name "script*.log" -exec head {} \; -exec rm -f {} \;
|
||||
find "${HOME}" -name "script*.log" -exec head {} \; -exec tail {} \; -exec rm -f {} \;
|
||||
echo
|
||||
echo -e "${yellow}========================================== *.RPT =============================================="
|
||||
find "${HOME}" -name "*.RPT" -exec ls -la {} \; -exec rm -f {} \;
|
||||
find "${HOME}" -name "*.RPT" -exec ls -la {} \; -exec tail {} \; -exec rm -f {} \;
|
||||
echo
|
||||
echo -e "${yellow}========================================== End crash log ======================================"
|
||||
}
|
||||
|
||||
# Make sure we don't start collecting core files
|
||||
# FIXME Set this in Docker somewhere
|
||||
ulimit -c 0
|
||||
|
||||
# DayZ Experimental SteamID, because there is no release version of the Linux server yet
|
||||
appid=1042420
|
||||
|
||||
|
@ -193,16 +189,13 @@ fn_start_dayz(){
|
|||
printf "[ ${green}DayZ${default} ] Server starting...\n"
|
||||
./DayZServer $dayzparameter
|
||||
EXIT_CODE=$?
|
||||
if [[ ${EXIT_CODE} = "139" ]]
|
||||
then
|
||||
EXIT_CODE=0
|
||||
fi
|
||||
printf "[ ${yellow}DayZ${default} ] Server stopped. Exit code: ${EXIT_CODE}\n"
|
||||
printf "[ ${yellow}DayZ${default} ] Server exited. Exit code: ${EXIT_CODE}\n"
|
||||
exit ${EXIT_CODE}
|
||||
}
|
||||
|
||||
fn_stop_dayz(){
|
||||
echo "Stopping DayZ server...(this is not implemented)"
|
||||
echo "Stopping DayZ server..."
|
||||
kill -TERM $(pidof DayZServer)
|
||||
}
|
||||
|
||||
fn_steam_login(){
|
||||
|
|
Loading…
Add table
Reference in a new issue