mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-13 03:18:28 +00:00
Support multiple commands in a single invocation
This commit is contained in:
parent
f58645cc1a
commit
b52770f236
@ -579,7 +579,8 @@ doUpgrade() {
|
||||
# check the configuration and throw errors or warnings if needed
|
||||
checkConfig
|
||||
|
||||
case "$1" in
|
||||
while true; do
|
||||
case "$1" in
|
||||
start)
|
||||
doStart
|
||||
;;
|
||||
@ -600,8 +601,10 @@ case "$1" in
|
||||
update)
|
||||
if [ "$2" == "--force" ]; then
|
||||
forceUpdate
|
||||
shift
|
||||
elif [ "$2" == "--safe" ]; then
|
||||
doSafeUpdate
|
||||
shift
|
||||
else
|
||||
doUpdate
|
||||
fi
|
||||
@ -614,12 +617,14 @@ case "$1" in
|
||||
;;
|
||||
broadcast)
|
||||
doBroadcast "$2"
|
||||
shift
|
||||
;;
|
||||
saveworld)
|
||||
doSaveWorld
|
||||
;;
|
||||
rconcmd)
|
||||
rconcmd "$2"
|
||||
shift
|
||||
;;
|
||||
status)
|
||||
printStatus
|
||||
@ -644,9 +649,16 @@ case "$1" in
|
||||
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"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo "arkmanager v${arkstVersion}: no command specified"
|
||||
echo "Try 'arkmanager -h' or 'arkmanager --help' for more information."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
shift
|
||||
if [ $# -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user