From 3e6a2136d93f7868cb9880e66652377776e728f9 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Tue, 2 Jan 2018 16:13:20 +0200 Subject: [PATCH] Don't create already created dir Remove monkey_island dir on removal --- monkey_island/deb-package/DEBIAN/postinst | 1 - monkey_island/deb-package/DEBIAN/prerm | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey_island/deb-package/DEBIAN/postinst b/monkey_island/deb-package/DEBIAN/postinst index 44caa26de..601fbc046 100644 --- a/monkey_island/deb-package/DEBIAN/postinst +++ b/monkey_island/deb-package/DEBIAN/postinst @@ -9,7 +9,6 @@ chmod 755 /usr/bin/monkey # Prepare python virtualenv pip install virtualenv --no-index --find-links file://$INSTALLATION_FOLDER -mkdir ${MONKEY_FOLDER}/bin virtualenv ${PYTHON_FOLDER} # install pip requirements diff --git a/monkey_island/deb-package/DEBIAN/prerm b/monkey_island/deb-package/DEBIAN/prerm index e7924c738..98557e487 100644 --- a/monkey_island/deb-package/DEBIAN/prerm +++ b/monkey_island/deb-package/DEBIAN/prerm @@ -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 \ No newline at end of file