blob: 963e951973a42975fa06b905625dd6b0e3656fa3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
INSPECTOR_TYPE=${INSPECTOR_TYPE:-sample}
function is_inspector_supported {
local inspector="$1"
[[ -f $TOP_DIR/lib/inspectors/$inspector ]]
}
function is_inspector {
local inspector="$1"
[[ $inspector == $INSPECTOR_TYPE ]]
}
function start_inspector {
start_inspector_$INSPECTOR_TYPE
}
function stop_inspector {
stop_inspector_$INSPECTOR_TYPE
}
function cleanup_inspector {
cleanup_inspector_$INSPECTOR_TYPE
}
if ! is_inspector_supported $INSPECTOR_TYPE; then
die $LINENO"INSPECTOR_TYPE=$INSPECTOR_TYPE is not supported."
fi
source $TOP_DIR/lib/inspectors/$INSPECTOR_TYPE
|