mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-06-27 20:48:04 +02:00
Add rcon client (#550)
* Add rcon client to container * Explain rcon command * Remove test container name * Apply suggestions Co-authored-by: Florian Kinder <florian.kinder@fankserver.com> * Add example docker-compose file * Clarify return code * Switch to pre-update * Update docker-compose.yml Co-authored-by: Florian Kinder <florian.kinder@fankserver.com> * Allow build support for build (/* is only possible in buildx) * Added version information in README.md --------- Co-authored-by: Florian Kinder <florian.kinder@fankserver.com>
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=$(rcon /players)
|
||||
ONLINE_COUNT=$(echo "$PLAYERS" | grep -c " (online)$")
|
||||
|
||||
if [[ "$ONLINE_COUNT" -gt "0" ]]; then
|
||||
echo "$PLAYERS"
|
||||
# exit with 75 (EX_TEMPFAIL) so watchtower skips the update
|
||||
# https://containrrr.dev/watchtower/lifecycle-hooks/
|
||||
exit 75
|
||||
fi
|
Reference in New Issue
Block a user