mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-23 06:58:28 +00:00
Add testconfig command
This commit is contained in:
parent
b4ac7a2eeb
commit
dfeaf604a7
@ -3487,6 +3487,30 @@ doPrintConfig(){
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
doTestConfig(){
|
||||||
|
set -e
|
||||||
|
if [ -r "${arkstGlobalCfgFile}" ]; then
|
||||||
|
source "${arkstGlobalCfgFile}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -r "${HOME}/${arkstUserCfgFile}" ]; then
|
||||||
|
source "${HOME}/${arkstUserCfgFile}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -r "$configfile" ]; then
|
||||||
|
source "$configfile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -n "$steamcmdroot" -a -d "$steamcmdroot" -a -r "$steamcmdroot"
|
||||||
|
test -f "$steamcmdroot/$steamcmdexec"
|
||||||
|
test -n "$arkserverroot" -a -d "$arkserverroot" -a -r "$arkserverroot"
|
||||||
|
test -n "$arkserverexec" -a -x "$arkserverroot/$arkserverexec"
|
||||||
|
test -n "$savedarksdir" -a -d "$savedarksdir" -a -w "$savedarksdir"
|
||||||
|
test "$mod_branch" = "Linux" -a -z "$nowarnmodbranch"
|
||||||
|
test -n "$logdir" -a -d "$logdir" -a -w "$logdir"
|
||||||
|
set +e
|
||||||
|
}
|
||||||
|
|
||||||
useConfig() {
|
useConfig() {
|
||||||
configfile=
|
configfile=
|
||||||
if [ -f "/etc/arkmanager/instances/${1}.cfg" ]; then
|
if [ -f "/etc/arkmanager/instances/${1}.cfg" ]; then
|
||||||
@ -3943,6 +3967,9 @@ main(){
|
|||||||
printconfig)
|
printconfig)
|
||||||
doPrintConfig
|
doPrintConfig
|
||||||
;;
|
;;
|
||||||
|
testconfig)
|
||||||
|
doTestConfig
|
||||||
|
;;
|
||||||
status)
|
status)
|
||||||
printStatus
|
printStatus
|
||||||
;;
|
;;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user