diff options
Diffstat (limited to 'run')
-rwxr-xr-x | run | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#!/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 + if interval; then + sleep "${long_interval-300}" + else + sleep "${short_interval-30}" + fi + check + status=$? + if [ "$laststatus" -eq 0 ] && [ "$status" -ne 0 ]; then + failed + fi + laststatus=$status +done |