blob: 2fb7c409c9cedb57a43fddbec8db4386fe296965 (
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
|
#!/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 {
if ! is_inspector_supported $INSPECTOR_TYPE; then
die $LINENO"INSPECTOR_TYPE=$INSPECTOR_TYPE is not supported."
fi
source $TOP_DIR/lib/inspectors/$INSPECTOR_TYPE
start_inspector_$INSPECTOR_TYPE
}
function stop_inspector {
stop_inspector_$INSPECTOR_TYPE
}
function cleanup_inspector {
cleanup_inspector_$INSPECTOR_TYPE
}
|