chg: [launcher] Adding install and launcher scripts
parent
3844908794
commit
7447bda4ac
|
@ -1,2 +1,4 @@
|
|||
.idea/
|
||||
ipa.egg-info/
|
||||
.venv
|
||||
db/
|
|
@ -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
|
|
@ -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()
|
||||
|
|
|
@ -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 #################################
|
||||
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue