When the cron job for the daily reboot launches valheim_is_idle which subsequently launches valheim-status, valheim-status does not have the environment variables it needs and falls back to defaults. On servers that are not using the default ports this causes the status to timeout which is treated as 0 players online resulting in a reboot even when players are online.
This patch modifies the crontab file so that the cron environment will have SERVER_PORT and STATUS_HTTP_HTDOCS which are the 2 parameters that valheim-status tries to get from the environment.
When the cron job for the daily reboot launches valheim_is_idle which subsequently launches valheim-status, valheim-status does not have the environment variables it needs and falls back to defaults. On servers that are not using the default ports this causes the status to timeout which is treated as 0 players online resulting in a reboot even when players are online.
This patch modifies the crontab file so that the cron environment will have SERVER_PORT and STATUS_HTTP_HTDOCS which are the 2 parameters that valheim-status tries to get from the environment.