- basics of init-script working
- basic shell script which enables virtualenv environment and calls traceroute.py at intervals - added stubs to only call webhook based on a specified latency - still need to store offline data in redis - coming soon
This commit is contained in:
parent
b2c2b63b1c
commit
ffd8158c25
4 changed files with 152 additions and 7 deletions
19
init-script/traceroute.sh
Executable file
19
init-script/traceroute.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
EXEC_DIR=/var/lib/python/traceroute
|
||||
VIRTUALENV_DIR=/var/lib/python/traceroute/env
|
||||
|
||||
# Repeat every 5 seconds
|
||||
INTERVAL=5 #
|
||||
|
||||
source $VIRTUALENV_DIR/bin/activate
|
||||
|
||||
cd $EXEC_DIR
|
||||
|
||||
# TODO add some logging later
|
||||
|
||||
while true;
|
||||
do
|
||||
python ./traceroute.py --ip_address=8.8.8.8 -c LO --webhook=http://localhost:8081/test;
|
||||
sleep $INTERVAL;
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue