diff --git a/ArchiSteamFarm/overlay/variant-base/linux/ArchiSteamFarm-Service.sh b/ArchiSteamFarm/overlay/variant-base/linux/ArchiSteamFarm-Service.sh index 4fd3952db..ae5c012e3 100755 --- a/ArchiSteamFarm/overlay/variant-base/linux/ArchiSteamFarm-Service.sh +++ b/ArchiSteamFarm/overlay/variant-base/linux/ArchiSteamFarm-Service.sh @@ -67,7 +67,7 @@ done BINARY_PREFIX="" -if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then +if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then # Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true diff --git a/ArchiSteamFarm/overlay/variant-specific/docker/ArchiSteamFarm.sh b/ArchiSteamFarm/overlay/variant-specific/docker/ArchiSteamFarm.sh index f4eccb3eb..9d363c9dd 100755 --- a/ArchiSteamFarm/overlay/variant-specific/docker/ArchiSteamFarm.sh +++ b/ArchiSteamFarm/overlay/variant-specific/docker/ArchiSteamFarm.sh @@ -67,7 +67,7 @@ done BINARY_PREFIX="" -if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then +if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then # Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true diff --git a/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm-Service.sh b/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm-Service.sh index a9d316c63..3d9a6f2cb 100755 --- a/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm-Service.sh +++ b/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm-Service.sh @@ -67,7 +67,7 @@ done BINARY_PREFIX="" -if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then +if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then # Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true diff --git a/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm.sh b/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm.sh index e35849426..47083dca1 100755 --- a/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm.sh +++ b/ArchiSteamFarm/overlay/variant-specific/generic-netf/ArchiSteamFarm.sh @@ -67,7 +67,7 @@ done BINARY_PREFIX="" -if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then +if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then # Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true diff --git a/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm-Service.sh b/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm-Service.sh index 01409c270..58d23e98f 100755 --- a/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm-Service.sh +++ b/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm-Service.sh @@ -67,7 +67,7 @@ done BINARY_PREFIX="" -if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then +if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then # Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true diff --git a/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm.sh b/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm.sh index f4eccb3eb..9d363c9dd 100755 --- a/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm.sh +++ b/ArchiSteamFarm/overlay/variant-specific/generic/ArchiSteamFarm.sh @@ -67,7 +67,7 @@ done BINARY_PREFIX="" -if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then +if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then # Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true