#!/bin/sh

set -eu

# refs: #914477
sleep 15

echo "+ systemctl status rspamd"
systemctl status rspamd
echo "+ systemctl is-enabled rspamd"
systemctl is-enabled rspamd
echo "+ systemctl is-active rspamd"
systemctl is-active rspamd

# rspamd_url_init is compiling a lot of TLD suffixes on the first start. It
# might take a long time and will delay the workers start.
sleep 15

echo "+ curl --stderr - --no-progress-meter --retry 3 --retry-connrefused --retry-delay 2 http://127.0.0.1:11334"
curl --stderr - --no-progress-meter --retry 3 --retry-connrefused --retry-delay 2 http://127.0.0.1:11334
