1#!/usr/bin/env bash
2# SPDX-License-Identifier: LGPL-2.1-or-later
3set -ex
4
5if [ -f /tmp/testsuite-57.counter ] ; then
6    read -r counter < /tmp/testsuite-57.counter
7    counter=$(("$counter" + 1))
8else
9    counter=0
10fi
11
12echo "$counter" > /tmp/testsuite-57.counter
13
14if [ "$counter" -eq 5 ] ; then
15    systemctl kill --kill-who=main -sUSR1 testsuite-57.service
16fi
17
18exec sleep 1.5
19