feat: parallel actions

This commit is contained in:
2020-08-07 14:20:40 +03:00
parent debe08037e
commit 2198482459
6 changed files with 36 additions and 5 deletions

View File

@ -37,6 +37,7 @@ function password_game () # $1: Password (if empty, use: ''), $*: Instance[s]
for Instance in $InstanceList
do
(
if instance_exists "$Instance"; then
local Config="$InstanceConfigDir/$Instance/LinuxServer-KFGame.ini"
local Service=$(service_name "$Instance")
@ -52,7 +53,9 @@ function password_game () # $1: Password (if empty, use: ''), $*: Instance[s]
else
echo "Instance $Instance not exitst"
fi
) &
done
wait
}
function password_admin () # $1: Password (if empty, use: ''), $*: Instance[s]
@ -73,6 +76,7 @@ function password_admin () # $1: Password (if empty, use: ''), $*: Instance[s]
for Instance in $InstanceList
do
(
if instance_exists "$Instance"; then
local Config="$InstanceConfigDir/$Instance/LinuxServer-KFGame.ini"
local Service=$(service_name "$Instance")
@ -88,6 +92,8 @@ function password_admin () # $1: Password (if empty, use: ''), $*: Instance[s]
else
echo "Instance $Instance not exitst"
fi
) &
done
wait
}