lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.92k stars 269 forks source link

Add SERVER_PUBLIC to cron environment #560

Closed wcdanh2 closed 1 year ago

wcdanh2 commented 1 year ago

When SERVER_PUBLIC is set to false the server does not respond on the query port. When server_is_idle() is run under cron environment SERVER_PUBLIC is unset and defaults to true causing the function to attempt to use the query port.

This patch adds SERVER_PUBLIC to the cron environment so that server_is_idle() will use the correct path for determining if players are online.

See #551 Restart if idle only restarts when NOT idle.

SolidBrave commented 7 months ago

So is this resolved because for me the server still just restarts even if players are connected?