mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 15:14:41 +00:00
Add awful workaround for #1812
This commit is contained in:
parent
a8a05fc4c0
commit
28ebc497d8
3 changed files with 66 additions and 0 deletions
|
@ -62,6 +62,28 @@ CONFIG_PATH="$(pwd)/${CONFIG_PATH}"
|
|||
# Kill underlying ASF process on shell process exit
|
||||
trap "trap - TERM && kill -- -$$" INT TERM
|
||||
|
||||
# TODO: Workaround for https://github.com/JustArchiNET/ArchiSteamFarm/issues/1812
|
||||
if [ -n "${DOTNET_RUNNING_IN_CONTAINER-}" ] && [ "$DOTNET_RUNNING_IN_CONTAINER" = "true" ]; then
|
||||
(
|
||||
loops=6 # Maximum of 60 seconds for unpack
|
||||
|
||||
while [ "$loops" -gt 0 ]; do
|
||||
sleep 10
|
||||
|
||||
if [ -d "/var/tmp/.net/ArchiSteamFarm" ]; then
|
||||
find "/var/tmp/.net/ArchiSteamFarm" -mindepth 2 -maxdepth 2 -name '*\\*' | while IFS="" read -r broken_path; do
|
||||
fixed_path="$(echo "$broken_path" | sed 's/\\/\//g')"
|
||||
|
||||
mkdir -p "$(dirname "$fixed_path")"
|
||||
mv "$broken_path" "$fixed_path"
|
||||
done
|
||||
fi
|
||||
|
||||
loops="$((loops-1))"
|
||||
done
|
||||
) &
|
||||
fi
|
||||
|
||||
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
|
||||
|
|
|
@ -62,6 +62,28 @@ CONFIG_PATH="$(pwd)/${CONFIG_PATH}"
|
|||
# Kill underlying ASF process on shell process exit
|
||||
trap "trap - TERM && kill -- -$$" INT TERM
|
||||
|
||||
# TODO: Workaround for https://github.com/JustArchiNET/ArchiSteamFarm/issues/1812
|
||||
if [ -n "${DOTNET_RUNNING_IN_CONTAINER-}" ] && [ "$DOTNET_RUNNING_IN_CONTAINER" = "true" ]; then
|
||||
(
|
||||
loops=6 # Maximum of 60 seconds for unpack
|
||||
|
||||
while [ "$loops" -gt 0 ]; do
|
||||
sleep 10
|
||||
|
||||
if [ -d "/var/tmp/.net/ArchiSteamFarm" ]; then
|
||||
find "/var/tmp/.net/ArchiSteamFarm" -mindepth 2 -maxdepth 2 -name '*\\*' | while IFS="" read -r broken_path; do
|
||||
fixed_path="$(echo "$broken_path" | sed 's/\\/\//g')"
|
||||
|
||||
mkdir -p "$(dirname "$fixed_path")"
|
||||
mv "$broken_path" "$fixed_path"
|
||||
done
|
||||
fi
|
||||
|
||||
loops="$((loops-1))"
|
||||
done
|
||||
) &
|
||||
fi
|
||||
|
||||
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
|
||||
|
|
|
@ -62,6 +62,28 @@ CONFIG_PATH="$(pwd)/${CONFIG_PATH}"
|
|||
# Kill underlying ASF process on shell process exit
|
||||
trap "trap - TERM && kill -- -$$" INT TERM
|
||||
|
||||
# TODO: Workaround for https://github.com/JustArchiNET/ArchiSteamFarm/issues/1812
|
||||
if [ -n "${DOTNET_RUNNING_IN_CONTAINER-}" ] && [ "$DOTNET_RUNNING_IN_CONTAINER" = "true" ]; then
|
||||
(
|
||||
loops=6 # Maximum of 60 seconds for unpack
|
||||
|
||||
while [ "$loops" -gt 0 ]; do
|
||||
sleep 10
|
||||
|
||||
if [ -d "/var/tmp/.net/ArchiSteamFarm" ]; then
|
||||
find "/var/tmp/.net/ArchiSteamFarm" -mindepth 2 -maxdepth 2 -name '*\\*' | while IFS="" read -r broken_path; do
|
||||
fixed_path="$(echo "$broken_path" | sed 's/\\/\//g')"
|
||||
|
||||
mkdir -p "$(dirname "$fixed_path")"
|
||||
mv "$broken_path" "$fixed_path"
|
||||
done
|
||||
fi
|
||||
|
||||
loops="$((loops-1))"
|
||||
done
|
||||
) &
|
||||
fi
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue