summaryrefslogtreecommitdiff
path: root/test/units/testsuite-07.sh
blob: bd1da341acb67b8bf4cef915182d4e06982b0590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
set -eux
set -o pipefail

: >/failed

cat >/lib/systemd/system/my.service <<EOF
[Service]
Type=oneshot
ExecStart=/bin/echo Timer runs me
EOF

cat >/lib/systemd/system/my.timer <<EOF
[Timer]
OnBootSec=10s
OnUnitInactiveSec=1h
EOF

systemctl unmask my.timer

systemctl start my.timer

mkdir -p /etc/systemd/system/my.timer.d/
cat >/etc/systemd/system/my.timer.d/override.conf <<EOF
[Timer]
OnBootSec=10s
OnUnitInactiveSec=1h
EOF

systemctl daemon-reload

systemctl mask my.timer

touch /testok
rm /failed