mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-23 15:08:28 +00:00
Don't migrate to main.cfg if arkSingleInstance is set
This commit is contained in:
parent
d50fdd1b33
commit
c4db8f665e
@ -3,7 +3,7 @@
|
|||||||
configfile="$1"
|
configfile="$1"
|
||||||
instancefile="$2"
|
instancefile="$2"
|
||||||
|
|
||||||
if grep "^arkserverroot=" <"$configfile" >/dev/null 2>&1 && [ ! -f "$instancefile" ]; then
|
if ! grep '^arkSingleInstance=' <"$configfile" >/dev/null 2>&1 && grep "^arkserverroot=" <"$configfile" >/dev/null 2>&1 && [ ! -f "$instancefile" ]; then
|
||||||
sed -n '/^#*\(ark\(\|flag\|opt\)_[^=]*\|arkserverroot\|serverMap\(\|ModId\)\)=/p' <"$configfile" >"$instancefile"
|
sed -n '/^#*\(ark\(\|flag\|opt\)_[^=]*\|arkserverroot\|serverMap\(\|ModId\)\)=/p' <"$configfile" >"$instancefile"
|
||||||
sed -i '/^ark\(serverroot\|_\(RCONPort\|Port\|QueryPort\)\)=/d' "$configfile"
|
sed -i '/^ark\(serverroot\|_\(RCONPort\|Port\|QueryPort\)\)=/d' "$configfile"
|
||||||
echo 'defaultinstance="main"' >>"$configfile"
|
echo 'defaultinstance="main"' >>"$configfile"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user