reed-alert.in - reed-alert - Lightweight agentless alerting system for server
HTML git clone git://bitreich.org/reed-alert/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/reed-alert/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
reed-alert.in (813B)
---
1 #!/bin/sh
2
3 REEDDIR=
4
5 # check for ecl
6 type ecl 2>&1 >/dev/null
7 if [ $? -eq 0 ]
8 then
9 LISP="ecl"
10 PARAMS="--norc"
11 LOADPARAM="-load"
12 SHELLPARAM="-shell"
13 else
14 # check for sbcl if ecl not in PATH
15 type sbcl 2>&1 >/dev/null
16 if [ $? -eq 0 ]
17 then
18 LISP="sbcl"
19 PARAMS="--noinform --no-userinit"
20 LOADPARAM="--script"
21 SHELLPARAM="--script"
22 else
23 echo "ecl or sbcl not found in PATH."
24 echo "you need at least one of them to use reed-alert"
25 exit 1
26 fi
27 fi
28
29 if [ $# -eq 0 ]
30 then
31 echo "usage: $0 filename"
32 exit 2
33 fi
34
35 if [ ! -f "$1" ]
36 then
37 echo "$1 not found"
38 exit 3
39 fi
40
41 # prevent interpreter output when loading files
42 $LISP $PARAMS --eval \
43 "(let ((*standard-output* (make-broadcast-stream)))
44 (require 'asdf)
45 (load \"$REEDDIR/functions.lisp\")
46 (load \"$REEDDIR/probes.lisp\"))" \
47 $SHELLPARAM $1