This will accept varying number of whitespace characters
This commit is contained in:
JustArchi 2017-10-14 11:59:07 +02:00
parent 128b6d2e5b
commit 7b34a84442
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ ASF_ARGS+=" $*"
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
while :; do
if grep -Fq '"Headless": true' 'config/ASF.json'; then
if grep -Eq '"Headless":\s+?true' 'config/ASF.json'; then
# We're running ASF in headless mode so we don't need STDIN
dotnet ArchiSteamFarm.dll $ASF_ARGS & # Start ASF in the background, trap will work properly due to non-blocking call
wait $! # This will forward dotnet error code, set -e will abort the script if it's non-zero

View file

@ -11,7 +11,7 @@ ASF_ARGS+=" $*"
# Kill underlying ASF process on shell process exit
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
if grep -Fq '"Headless": true' 'config/ASF.json'; then
if grep -Eq '"Headless":\s+?true' 'config/ASF.json'; then
# We're running ASF in headless mode so we don't need STDIN
dotnet ArchiSteamFarm.dll $ASF_ARGS & # Start ASF in the background, trap will work properly due to non-blocking call
wait $! # This will forward dotnet error code, set -e will abort the script if it's non-zero