]> git.proxmox.com Git - systemd.git/blob - test/units/testsuite-07.sh
New upstream version 249~rc1
[systemd.git] / test / units / testsuite-07.sh
1 #!/usr/bin/env bash
2 set -eux
3 set -o pipefail
4
5 : >/failed
6
7 cat >/lib/systemd/system/my.service <<EOF
8 [Service]
9 Type=oneshot
10 ExecStart=/bin/echo Timer runs me
11 EOF
12
13 cat >/lib/systemd/system/my.timer <<EOF
14 [Timer]
15 OnBootSec=10s
16 OnUnitInactiveSec=1h
17 EOF
18
19 systemctl unmask my.timer
20
21 systemctl start my.timer
22
23 mkdir -p /etc/systemd/system/my.timer.d/
24 cat >/etc/systemd/system/my.timer.d/override.conf <<EOF
25 [Timer]
26 OnBootSec=10s
27 OnUnitInactiveSec=1h
28 EOF
29
30 systemctl daemon-reload
31
32 systemctl mask my.timer
33
34 touch /testok
35 rm /failed