forked from p34709852/monkey
Debian package now requires mongo as dependency instead of having a monkey-mongo service
This commit is contained in:
parent
0513966c76
commit
1189d42bbb
|
@ -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, python-pip, python-dev, mongodb
|
||||
|
|
|
@ -20,14 +20,12 @@ if [ -d "/etc/systemd/network" ]; then
|
|||
cp ${MONKEY_FOLDER}/monkey_island/ubuntu/systemd/*.service /lib/systemd/system/
|
||||
chmod +x ${MONKEY_FOLDER}/monkey_island/ubuntu/systemd/start_server.sh
|
||||
systemctl daemon-reload
|
||||
systemctl enable monkey-mongo
|
||||
systemctl enable monkey-island
|
||||
fi
|
||||
|
||||
${MONKEY_FOLDER}/monkey_island/create_certificate.sh
|
||||
|
||||
service monkey-island start
|
||||
service monkey-mongo start
|
||||
|
||||
echo Monkey Island installation ended
|
||||
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
service monkey-island stop || true
|
||||
service monkey-mongo stop || true
|
||||
|
||||
rm -f /etc/init/monkey-island.conf
|
||||
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
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
service monkey-mongo stop
|
||||
cd /var/monkey/monkey_island
|
||||
rm -rf ./db/*
|
||||
service monkey-mongo start
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /var/monkey
|
||||
/var/monkey/monkey_island/bin/mongodb/bin/mongod --quiet --dbpath /var/monkey/monkey_island/db &
|
||||
/var/monkey/monkey_island/bin/python/bin/python monkey_island.py
|
|
@ -1,18 +0,0 @@
|
|||
description "Monkey Island Mongo Service"
|
||||
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
|
||||
respawn
|
||||
respawn limit unlimited
|
||||
|
||||
script
|
||||
chdir /var/monkey/monkey_island/
|
||||
exec /var/monkey/monkey_island/bin/mongodb/bin/mongod --dbpath db
|
||||
end script
|
||||
|
||||
post-stop script
|
||||
if [ -n $UPSTART_EVENTS ]; then
|
||||
exec sleep 3
|
||||
fi
|
||||
end script
|
|
@ -1,6 +1,5 @@
|
|||
[Unit]
|
||||
Description=Monkey Island Service
|
||||
Wants=monkey-mongo.service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
[Unit]
|
||||
Description=Monkey Island Mongo Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/var/monkey/monkey_island/bin/mongodb/bin/mongod --quiet --dbpath /var/monkey/monkey_island/db
|
||||
KillMode=process
|
||||
Restart=always
|
||||
ExecStop=/var/monkey/monkey_island/bin/mongodb/bin/mongod --shutdown
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue