mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-12 10:58:28 +00:00
11 lines
449 B
Bash
Executable File
11 lines
449 B
Bash
Executable File
#!/bin/bash
|
|
|
|
configfile="$1"
|
|
instancefile="$2"
|
|
|
|
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 -i '/^ark\(serverroot\|_\(RCONPort\|Port\|QueryPort\)\)=/d' "$configfile"
|
|
echo 'defaultinstance="main"' >>"$configfile"
|
|
fi
|