mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Docker: make it possible to pass arguments
This commit is contained in:
@@ -2,9 +2,13 @@
|
||||
set -eu
|
||||
cd "$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
if [[ -z "${ASF_ARGS-}" ]]; then
|
||||
ASF_ARGS=""
|
||||
fi
|
||||
|
||||
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
|
||||
|
||||
while [[ -f ArchiSteamFarm.dll ]]; do
|
||||
dotnet ArchiSteamFarm.dll --service # We will abort the script if ASF exits with an error
|
||||
dotnet ArchiSteamFarm.dll --service $ASF_ARGS # We will abort the script if ASF exits with an error
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
@echo off
|
||||
pushd %~dp0
|
||||
dotnet ArchiSteamFarm.dll
|
||||
dotnet %ASF_ARGS% ArchiSteamFarm.dll
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
cd "$(dirname "$(readlink -f "$0")")"
|
||||
dotnet ArchiSteamFarm.dll
|
||||
|
||||
if [[ -z "${ASF_ARGS-}" ]]; then
|
||||
ASF_ARGS=""
|
||||
fi
|
||||
|
||||
# We don't need our shell anymore, just replace the current process instead of starting a new one
|
||||
exec dotnet $ASF_ARGS ArchiSteamFarm.dll
|
||||
|
||||
Reference in New Issue
Block a user