This commit is contained in:
JustArchi
2017-10-31 20:16:01 +01:00
parent 98e5257366
commit ac1dfb6c60
3 changed files with 6 additions and 6 deletions

View File

@@ -57,11 +57,11 @@ dotnet --info
while :; do
if [[ -f "$CONFIG_PATH" ]] && grep -Eq '"Headless":\s+?true' "$CONFIG_PATH"; then
# We're running ASF in headless mode so we don't need STDIN
dotnet "$BINARY" "${BINARY_ARGS[@]}" & # Start ASF in the background, trap will work properly due to non-blocking call
dotnet "$BINARY" "${BINARY_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
else
# We're running ASF in non-headless mode, so we need STDIN to be operative
dotnet "$BINARY" "${BINARY_ARGS[@]}" # Start ASF in the foreground, trap sadly won't work until process exit
dotnet "$BINARY" "${BINARY_ARGS[@]-}" # Start ASF in the foreground, trap sadly won't work until process exit
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update

View File

@@ -56,11 +56,11 @@ dotnet --info
if [[ -f "$CONFIG_PATH" ]] && grep -Eq '"Headless":\s+?true' "$CONFIG_PATH"; then
# We're running ASF in headless mode so we don't need STDIN
dotnet "$BINARY" "${BINARY_ARGS[@]}" & # Start ASF in the background, trap will work properly due to non-blocking call
dotnet "$BINARY" "${BINARY_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
else
# We're running ASF in non-headless mode, so we need STDIN to be operative
dotnet "$BINARY" "${BINARY_ARGS[@]}" # Start ASF in the foreground, trap won't work until process exit
dotnet "$BINARY" "${BINARY_ARGS[@]-}" # Start ASF in the foreground, trap won't work until process exit
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update

4
run.sh
View File

@@ -55,9 +55,9 @@ dotnet --info
if [[ -f "$CONFIG_PATH" ]] && grep -Eq '"Headless":\s+?true' "$CONFIG_PATH"; then
# We're running ASF in headless mode so we don't need STDIN
dotnet exec "$BINARY" "${BINARY_ARGS[@]}" & # Start ASF in the background, trap will work properly due to non-blocking call
dotnet exec "$BINARY" "${BINARY_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
else
# We're running ASF in non-headless mode, so we need STDIN to be operative
dotnet exec "$BINARY" "${BINARY_ARGS[@]}" # Start ASF in the foreground, trap won't work until process exit
dotnet exec "$BINARY" "${BINARY_ARGS[@]-}" # Start ASF in the foreground, trap won't work until process exit
fi