Having it into the duniter.sh script prevents using duniter subcommands such as duniter wizard key which are then launched in the background.
duniter wizard key
Moving it into the entrypoint makes the subcommands available again.