files/gitlab-cookbooks/gitlab/templates/default/sv-mailroom-finish.erb (11 lines of code) (raw):
#!/bin/sh
# Fixes https://github.com/gitlabhq/gitlabhq/issues/9891 :
# mailroom respawn loop pinning the CPU.
if [ x$2 = x15 ] ; then
# mailroom received SIGTERM (15) so this is probably a
# user-initiated restart. Skip the waiting.
exit 0
fi
wait=5
echo "Runit: waiting ${wait} seconds before restarting mail_room"
sleep ${wait}