chg: [launcher] Adding install and launcher scripts

pull/1/head
airkeyp 2019-09-26 10:20:25 +02:00
parent 3844908794
commit 7447bda4ac
5 changed files with 42 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
.idea/
ipa.egg-info/
.venv
db/

22
analyzer_launch.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "${DIR}/.venv/bin/python" ]; then
ENV_PY="${DIR}/.venv/bin/python"
else
echo "Please make sure you ran install.sh first."
exit 1
fi
if [ ! -d "${DIR}/db" ]; then
mkdir db
fi
screen -dmS "ipa"
sleep 0.1
screen -S "ipa" -X screen -t "ipa-redis" bash -c "(redis-server ${DIR}/etc/redis.conf); read x;"
screen -S "ipa" -X screen -t "ipa-d4" bash -c "(cd bin; ${ENV_PY} ./run_ipa.py; read x;)"
exit 0

View File

@ -35,3 +35,7 @@ def export_icmp_types():
for key in redis_dict:
res += mds.table_row([key.decode(), redis_dict[key].decode()], [10, 10]) + '\n'
return res
if __name__ == "__main__":
export_icmp_types()

View File

@ -260,7 +260,7 @@ dbfilename dump.rdb
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir ../db
dir ./db
################################# REPLICATION #################################

12
install.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
set -x
export PIPENV_VENV_IN_PROJECT=1
if [ -z "$VIRTUAL_ENV" ]; then
pipenv install
export IPA_HOME=$(pwd)
fi