mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-07-10 11:05:21 +02:00
Add rcon client to container
This commit is contained in:
11
docker/files/players-online.sh
Executable file
11
docker/files/players-online.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
PLAYERS=$(docker exec xenodochial_spence rcon /players)
|
||||
ONLINE_COUNT=$(echo "$PLAYERS" | grep -c " (online)$")
|
||||
|
||||
if [[ "$ONLINE_COUNT" -gt "0" ]]; then
|
||||
echo "$PLAYERS"
|
||||
# exit with 75 (EX_TEMPFAIL) for watchtower
|
||||
# https://containrrr.dev/watchtower/lifecycle-hooks/
|
||||
exit 75
|
||||
fi
|
Reference in New Issue
Block a user