mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Handle chmod +x for generic helper scripts
This commit is contained in:
@@ -11,8 +11,9 @@ ASF_ARGS+=" $*"
|
|||||||
# Kill underlying ASF process on shell process exit
|
# Kill underlying ASF process on shell process exit
|
||||||
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
|
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
while [[ -f ArchiSteamFarm.dll ]]; do
|
while :; do
|
||||||
dotnet ArchiSteamFarm.dll $ASF_ARGS &
|
dotnet ArchiSteamFarm.dll $ASF_ARGS & # We need to start ASF in the background for trap to work
|
||||||
wait $! # This will forward dotnet error code, set -e will abort the script if it's non-zero
|
wait $! # This will forward dotnet error code, set -e will abort the script if it's non-zero
|
||||||
|
chmod +x "$0" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -8,5 +8,9 @@ fi
|
|||||||
|
|
||||||
ASF_ARGS+=" $*"
|
ASF_ARGS+=" $*"
|
||||||
|
|
||||||
# We don't need our shell anymore, just replace the current process instead of starting a new one
|
# Kill underlying ASF process on shell process exit
|
||||||
exec dotnet ArchiSteamFarm.dll $ASF_ARGS
|
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
|
dotnet ArchiSteamFarm.dll $ASF_ARGS & # We need to start ASF in the background for trap to work
|
||||||
|
wait $! # This will forward dotnet error code, set -e will abort the script if it's non-zero
|
||||||
|
chmod +x "$0" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update
|
||||||
|
|||||||
Reference in New Issue
Block a user