Add useconfig arkmanager command to specify config

This commit is contained in:
Ben Peddell 2015-07-20 17:17:56 +10:00
parent 2e65228607
commit 562bb93126
2 changed files with 19 additions and 0 deletions

View File

@ -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
;;
*)

View File

@ -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"