forked from p15670423/monkey
Merge pull request #77 from guardicore/feature/virtualenv
Feature/virtualenv
This commit is contained in:
commit
094e432898
|
@ -2,16 +2,17 @@
|
|||
|
||||
MONKEY_FOLDER=/var/monkey_island
|
||||
INSTALLATION_FOLDER=/var/monkey_island/installation
|
||||
PYTHON_FOLDER=/var/monkey_island/bin/python
|
||||
|
||||
cp -f ${MONKEY_FOLDER}/monkey.sh /usr/bin/monkey
|
||||
chmod 755 /usr/bin/monkey
|
||||
|
||||
# Fix dependency bug
|
||||
pip uninstall -y bson
|
||||
# Prepare python virtualenv
|
||||
pip2 install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
virtualenv -p python2.7 ${PYTHON_FOLDER}
|
||||
|
||||
# install pip requirements
|
||||
pip install -r $MONKEY_FOLDER/pip_requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
|
||||
${PYTHON_FOLDER}/bin/python -m pip install -r $MONKEY_FOLDER/pip_requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
|
||||
# remove installation folder and unnecessary files
|
||||
rm -rf ${INSTALLATION_FOLDER}
|
||||
|
|
|
@ -8,4 +8,6 @@ rm -f /etc/init/monkey-mongo.conf
|
|||
[ -f "/lib/systemd/system/monkey-island.service" ] && rm -f /lib/systemd/system/monkey-island.service
|
||||
[ -f "/lib/systemd/system/monkey-mongo.service" ] && rm -f /lib/systemd/system/monkey-mongo.service
|
||||
|
||||
rm -r -f /var/monkey_island
|
||||
|
||||
exit 0
|
|
@ -10,3 +10,4 @@ Flask-Pymongo
|
|||
Flask-Restful
|
||||
jsonschema
|
||||
netifaces
|
||||
virtualenv
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /var/monkey_island/cc
|
||||
python main.py
|
||||
/var/monkey_island/bin/python/bin/python main.py
|
Loading…
Reference in New Issue