Debian Codegraph @

sources/core/tools/oarnodecheck/template

raw
1 #!/bin/bash
2 ###############################################################################
3 # Perform a check and report to CHECKLOGFILE
4 # WARNING:
5 # The CHECKLOGFILE file must not be created unless the check really unveiled
6 # a problem.
7
8 # Print to stderr if CHECKLOGFILE is not defined yet (e.g. as the script is
9 # not called from oarnodecheckcron the CHECKLOGFILE environment variable is
10 # not defined)
11 [ -n "$CHECKLOGFILE" ] || CHECKLOGFILE=/dev/stderr
12
13 ###############################################################################
14 # YOUR CHECK SCRIPT GOES BELOW
15
16 # Example of check: does the oar user exist ?
17 id oar >& /dev/null || "OAR user not found on the system)" > $CHECKLOGFILE