Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions lgsm/functions/command_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@ sleep 0.5
echo -en "\n"
}

fn_start_docker(){
fn_parms
# Log rotation
fn_script_log_info "Rotating log files"
if [ "${engine}" == "unreal2" ]&&[ -f "${gamelog}" ]; then
mv "${gamelog}" "${gamelogdate}"
fi
if [ -f "${lgsmlog}" ]; then
mv "${lgsmlog}" "${lgsmlogdate}"
fi
if [ -f "${consolelog}" ]; then
mv "${consolelog}" "${consolelogdate}"
fi
# Create logfile
touch "${consolelog}"

# Create lockfile
date > "${rootdir}/${lockselfname}"
cd "${executabledir}"
${executable} ${parms} 2> ${lgsmlogdir}/.${servicename}-tmux-error.tmp
}

fn_print_dots "${servername}"
sleep 0.5
check.sh
Expand All @@ -211,6 +233,8 @@ fi

if [ "${gamename}" == "TeamSpeak 3" ]; then
fn_start_teamspeak3
elif [ "${docker}" == "on" ]; then
fn_start_docker
else
fn_start_tmux
fi
Expand Down