GC-4552: postinst fix

This commit is contained in:
urihershgc 2015-12-07 15:30:17 +02:00
parent 75796efaea
commit 48f09c64b3
1 changed files with 4 additions and 4 deletions

View File

@ -3,13 +3,13 @@
INSTALLATION_FOLDER=/var/monkey_island/installation INSTALLATION_FOLDER=/var/monkey_island/installation
# install pip requirements # install pip requirements
if [ -r $INSTALLATION_FOLDER/PACKAGE/pip_requirements.txt ]; then if [ -r $INSTALLATION_FOLDER/pip_requirements.txt ]; then
sed -i 's^git.*/\(.*\).git^\1^' $INSTALLATION_FOLDER/PACKAGE/pip_requirements.txt # Use only basename for remote git pips sed -i 's^git.*/\(.*\).git^\1^' $INSTALLATION_FOLDER/pip_requirements.txt # Use only basename for remote git pips
pip install -r $INSTALLATION_FOLDER/PACKAGE/pip_requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER/installation/PACKAGE pip install -r $INSTALLATION_FOLDER/pip_requirements.txt --no-index --find-links file://$INSTALLATION_FOLDER/installation/
fi fi
# remove installation folder # remove installation folder
if [ -r $INSTALLATION_FOLDER ]; then if [ -r $INSTALLATION_FOLDER ]; then
rm -rf $INSTALLATION_FOLDER/PACKAGE rm -rf $INSTALLATION_FOLDER
rmdir --ignore-fail-on-non-empty $INSTALLATION_FOLDER rmdir --ignore-fail-on-non-empty $INSTALLATION_FOLDER
fi fi