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.94k stars 272 forks source link

5am restart cron Job doesn't seem to trigger POST_START_HOOK #336

Closed Mist-Hunter closed 3 years ago

Mist-Hunter commented 3 years ago

This cron job: 0 5 * /usr/local/bin/valheim-is-idle && /usr/local/bin/supervisorctl restart valheim-server

properly triggers the POST_SERVER_SHUTDOWN_HOOK, which sends a corresponding Discord message to my server users, but it doesn't seem to trigger the POST_START_HOOK alerting said users to the fact the server is back up (which it is).

Maybe I'm using the wrong HOOK(s) or misunderstanding, but thought I'd post it here in case this isn't the intended behavior.

Mist-Hunter commented 3 years ago

Nevermind, I just noticed this POST_RESTART_HOOK, I will try that and reopen if I have a problem. Thanks for the great container!

lloesche commented 3 years ago

I recommend reading the description of each hook in https://github.com/lloesche/valheim-server-docker#event-hooks They explain in detail under which conditions which hook is triggered. For the 5am restart (or any server start for that matter) the PRE/POST_SERVER_RUN_HOOK might be interesting.