forked from p15670423/monkey
Merge pull request #532 from guardicore/bugfix/update_deb_postinst_to_py3
Update debian installation to use python3
This commit is contained in:
commit
749bf4aeb5
|
@ -5,4 +5,4 @@ Homepage: http://www.guardicore.com
|
|||
Priority: optional
|
||||
Version: 1.0
|
||||
Description: Guardicore Infection Monkey Island installation package
|
||||
Depends: openssl, python-pip, python-dev
|
||||
Depends: openssl, python3-pip, python3-dev
|
||||
|
|
|
@ -5,8 +5,8 @@ INSTALLATION_FOLDER=/var/monkey/monkey_island/installation
|
|||
PYTHON_FOLDER=/var/monkey/monkey_island/bin/python
|
||||
|
||||
# Prepare python virtualenv
|
||||
pip2 install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
virtualenv -p python2.7 ${PYTHON_FOLDER}
|
||||
pip3 install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
virtualenv -p python3 ${PYTHON_FOLDER}
|
||||
|
||||
# install pip requirements
|
||||
${PYTHON_FOLDER}/bin/python -m pip install -r $MONKEY_FOLDER/monkey_island/requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
|
|
|
@ -5,8 +5,8 @@ INSTALLATION_FOLDER=/var/monkey/monkey_island/installation
|
|||
PYTHON_FOLDER=/var/monkey/monkey_island/bin/python
|
||||
|
||||
# Prepare python virtualenv
|
||||
pip2 install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
virtualenv -p python2.7 ${PYTHON_FOLDER}
|
||||
pip3 install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
virtualenv -p python3 ${PYTHON_FOLDER}
|
||||
|
||||
# install pip requirements
|
||||
${PYTHON_FOLDER}/bin/python -m pip install -r $MONKEY_FOLDER/monkey_island/requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
MACHINE_TYPE=`uname -m`
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
MACHINE_TYPE=$(uname -m)
|
||||
if [ "${MACHINE_TYPE}" == 'x86_64' ]; then
|
||||
# 64-bit stuff here
|
||||
ARCH=64
|
||||
else
|
||||
|
@ -11,4 +11,4 @@ fi
|
|||
|
||||
MONKEY_FILE=monkey-linux-$ARCH
|
||||
cp -f /var/monkey/monkey_island/cc/binaries/$MONKEY_FILE /tmp
|
||||
/tmp/$MONKEY_FILE m0nk3y $@
|
||||
/tmp/$MONKEY_FILE m0nk3y "$@"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
MACHINE_TYPE=`uname -m`
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
MACHINE_TYPE=$(uname -m)
|
||||
if [ "${MACHINE_TYPE}" == 'x86_64' ]; then
|
||||
# 64-bit stuff here
|
||||
ARCH=64
|
||||
else
|
||||
|
@ -11,4 +11,4 @@ fi
|
|||
|
||||
MONKEY_FILE=monkey-linux-$ARCH
|
||||
cp -f /var/monkey/monkey_island/cc/binaries/$MONKEY_FILE /tmp
|
||||
/tmp/$MONKEY_FILE m0nk3y $@
|
||||
/tmp/$MONKEY_FILE m0nk3y "$@"
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
# Detecting command that calls python 3.7
|
||||
python_cmd=""
|
||||
if [[ `python --version 2>&1` == *"Python 3.7"* ]]; then
|
||||
if [[ $(python --version 2>&1) == *"Python 3.7"* ]]; then
|
||||
python_cmd="python"
|
||||
fi
|
||||
if [[ `python37 --version 2>&1` == *"Python 3.7"* ]]; then
|
||||
if [[ $(python37 --version 2>&1) == *"Python 3.7"* ]]; then
|
||||
python_cmd="python37"
|
||||
fi
|
||||
if [[ `python3.7 --version 2>&1` == *"Python 3.7"* ]]; then
|
||||
if [[ $(python3.7 --version 2>&1) == *"Python 3.7"* ]]; then
|
||||
python_cmd="python3.7"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue