diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2020-12-30 14:20:21 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2020-12-30 14:32:50 +0000 |
commit | b927aa1d91d50887e3bb5fa4333687d8ab373828 (patch) | |
tree | b6b9bbb48027a39fadaa7cdef99348bbac607252 /run | |
download | battd-b927aa1d91d50887e3bb5fa4333687d8ab373828.tar.gz battd-b927aa1d91d50887e3bb5fa4333687d8ab373828.tar.xz battd-b927aa1d91d50887e3bb5fa4333687d8ab373828.zip |
init commit
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 |