1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
systemd/test/units/testsuite-23-short-lived.sh
Frantisek Sumsal 539af5c441 test: merge unit file related tests into TEST-23-UNIT-FILE
Rename TEST-23-TYPE-EXEC to TEST-23-UNIT-FILE and merge it with
following tests:
  - TEST-37-RUNTIMEDIRECTORYPRESERV
  - TEST-40-EXEC-COMMAND-EX
  - TEST-41-ONESHOT-RESTART
  - TEST-42-EXECSTOPPOST
  - TEST-57-ONSUCCESS-UPHOLD
2023-05-10 02:39:12 +09:00

19 lines
375 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -ex
if [ -f /tmp/testsuite-23.counter ] ; then
read -r counter < /tmp/testsuite-23.counter
counter=$((counter + 1))
else
counter=0
fi
echo "$counter" >/tmp/testsuite-23.counter
if [ "$counter" -eq 5 ] ; then
systemctl kill --kill-whom=main -sUSR1 testsuite-23.service
fi
exec sleep 1.5