monkey debian minor improvements

This commit is contained in:
urihershgc 2016-01-19 16:07:02 +02:00
parent 0cd5d5aea3
commit eab6f386a8
3 changed files with 18 additions and 7 deletions

View File

@ -3,16 +3,18 @@
MONKEY_FOLDER=/var/monkey_island
INSTALLATION_FOLDER=/var/monkey_island/installation
chmod 755 /usr/bin/monkey
# install pip requirements
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
rm -f $MONKEY_FOLDER/pip_requirements.txt
rm -rf ${INSTALLATION_FOLDER}
rm -f ${MONKEY_FOLDER}/pip_requirements.txt
mv $MONKEY_FOLDER/ubuntu/* /etc/init/
mv ${MONKEY_FOLDER}/ubuntu/* /etc/init/
/var/monkey_island/create_certificate.sh
${MONKEY_FOLDER}/create_certificate.sh
service monkey-island start
service monkey-mongo start

View File

@ -0,0 +1,11 @@
###############################################################################
## This file is executed by the build_deb.sh file just before building the
## deb file.
## The script is executed when monkey repo is in the current directory
## Arguments (environment variables)
## $VERSION: current build version
## $TEMP: base folder where package is being built
###############################################################################
#!/bin/bash
copy_file ./monkey_island/linux/monkey.sh $TEMP/usr/bin/monkey

View File

@ -4,13 +4,11 @@ MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
# 64-bit stuff here
ARCH=64
else
# 32-bit stuff here
ARCH=32
fi
MONKEY_FILE=monkey-linux-$ARCH
cp -f ./cc/binaries/$MONKEY_FILE /tmp
cp -f /var/monkey-island/cc/binaries/$MONKEY_FILE /tmp
/tmp/$MONKEY_FILE m0nk3y