blob: 1d3103335b6537e9d7b7818d7831102e0165cda1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
function start_monitor_sample {
cp $TOP_DIR/lib/monitors/sample/monitor.py $TOP_DIR/monitor.py
pgrep -f "python monitor.py" && return 0
sudo -E python monitor.py "$COMPUTE_HOST" "$COMPUTE_IP" "$INSPECTOR_TYPE" \
> monitor.log 2>&1 &
}
function stop_monitor_sample {
pgrep -f "python monitor.py" || return 0
sudo kill $(pgrep -f "python monitor.py")
}
function cleanup_monitor_sample {
rm monitor.py
return
}
|