aboutsummaryrefslogtreecommitdiffstats
path: root/run
blob: 03f7d0825d34c31963bac4bf32f932a132afe650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# Copyright (C) 2020 Tomasz Kramkowski <tk@the-tk.com>
# SDPX-License-Identifier: MIT

. ./conf || exit 1
trap '. ./conf' HUP

check
laststatus=$?

while :; do
	interval
	check
	status=$?
	if [ "$laststatus" -eq 0 ] && [ "$status" -ne 0 ]; then
		failed
	fi
	laststatus=$status
done