mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-14 03:38:27 +00:00
Add useconfig arkmanager command to specify config
This commit is contained in:
parent
2e65228607
commit
562bb93126
@ -572,6 +572,16 @@ doUpgrade() {
|
||||
fi
|
||||
}
|
||||
|
||||
useConfig() {
|
||||
for varname in "${!configfile_@}"; do
|
||||
if [ "configfile_$1" == "$varname" ]; then
|
||||
source "${!varname}"
|
||||
return
|
||||
fi
|
||||
done
|
||||
source "$1"
|
||||
}
|
||||
|
||||
#---------------------
|
||||
# Main program
|
||||
#---------------------
|
||||
@ -632,6 +642,10 @@ while true; do
|
||||
upgrade)
|
||||
doUpgrade
|
||||
;;
|
||||
useconfig)
|
||||
useConfig "$2"
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
echo -e "Usage: arkmanager[OPTION]\n"
|
||||
echo "Option Description"
|
||||
@ -649,6 +663,7 @@ while true; do
|
||||
echo "update --force Apply update without check the current version"
|
||||
echo "update --safe Wait for server to perform world save and update."
|
||||
echo "upgrade Check for a new ARK Server Tools version and upgrades it if needed"
|
||||
echo "useconfig <name> Use the configuration overrides in the specified config name or file"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
|
||||
@ -31,3 +31,7 @@ logdir="/var/log/arktools" # Logs path
|
||||
|
||||
# steamdb specific
|
||||
appid=376030 # Linux server App ID
|
||||
|
||||
# alternate configs
|
||||
# example for config name "ark1":
|
||||
#config_ark1="/path/to/config/file"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user