From bd2edee49a8b78dbd1ace2132160066e38a41f6a Mon Sep 17 00:00:00 2001
From: Shay Nehmad <shay.nehmad@guardicore.com>
Date: Fri, 10 Apr 2020 16:47:55 +0300
Subject: [PATCH] Moved comments. For some reason, dpkg-deb can't read them

moved to postinst
---
 monkey/monkey_island/deb-package/DEBIAN_MONGO/control  | 6 ------
 monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst | 9 +++++++++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/monkey/monkey_island/deb-package/DEBIAN_MONGO/control b/monkey/monkey_island/deb-package/DEBIAN_MONGO/control
index f796b3a8a..a7bc2373e 100644
--- a/monkey/monkey_island/deb-package/DEBIAN_MONGO/control
+++ b/monkey/monkey_island/deb-package/DEBIAN_MONGO/control
@@ -6,9 +6,3 @@ Priority: optional
 Version: 1.0
 Description: Guardicore Infection Monkey Island installation package
 Depends: openssl, python3.7-dev, python3.7-venv, python3-venv, build-essential
-# Dependency - Why is it required
-# openssl - Server certificate generation
-# python3.7-dev - Server runtime
-# python3.7-venv - For creating virtual env to install all the server pip deps (don't want to pollute system python)
-# python3-venv - python3.7-venv doesn't work without it since you need ensure-pip
-# build-essential - for compiling python dependencies that don't come in a pre-compiled wheel, like `netifaces`
diff --git a/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst b/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst
index a2e29a784..20f72b56a 100644
--- a/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst
+++ b/monkey/monkey_island/deb-package/DEBIAN_MONGO/postinst
@@ -1,5 +1,14 @@
 #!/bin/bash
 
+# See the "Depends" field of the control file for what packages this scripts depends on.
+# Here are the explanations for the current deps:
+# Dependency - Why is it required
+## openssl - Server certificate generation
+## python3.7-dev - Server runtime
+## python3.7-venv - For creating virtual env to install all the server pip deps (don't want to pollute system python)
+## python3-venv - python3.7-venv doesn't work without it since you need ensure-pip
+## build-essential - for compiling python dependencies that don't come in a pre-compiled wheel, like `netifaces`
+
 echo "Installing Monkey Island (Infection Monkey server)..."
 
 MONKEY_FOLDER=/var/monkey