mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-15 12:08:26 +00:00
Add --no-background option to start command
This commit is contained in:
parent
88b9807971
commit
1515156a12
@ -1150,11 +1150,21 @@ doStart() {
|
||||
if [[ " $* " =~ " --alwaysrestart " ]]; then
|
||||
arkAlwaysRestartOnCrash=true
|
||||
fi
|
||||
|
||||
nobackground=
|
||||
if [[ " $* " =~ " --no-background " ]]; then
|
||||
nobackground=1
|
||||
fi
|
||||
|
||||
tput sc
|
||||
logprint "The server is starting..."
|
||||
|
||||
local pid=$!
|
||||
if [[ -n "$arkPriorityBoost" || -n "$arkCpuAffinity" ]]; then
|
||||
if [[ -n "$nobackground" ]]; then
|
||||
echo
|
||||
doRun "$@"
|
||||
return
|
||||
elif [[ -n "$arkPriorityBoost" || -n "$arkCpuAffinity" ]]; then
|
||||
doRun --wait </dev/null > >(while read -r l; do printf "%s: [%s] %s\n" "$(timestamp)" "${instance}" "${l}" >>"$logdir/$arkserverLog"; done) 2>&1 & # output of this command is logged
|
||||
local pid="$!"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user