#!/bin/bash

sudo ufw --force enable
/usr/bin/mongod --config /etc/mongod2.conf & 2> /var/www/test.freeplanet_server/errmongo.txt
sleep 10
cd /var/www/www.freeplanet_server
./startpm2.sh
cd /var/www/test.freeplanet_server
./startpm2.test.sh

sleep 7
cd /var/www/www.freeplanet_server
./stop_pm2.sh
sleep 7
./startpm2.sh

sleep 7
cd /var/www/test.freeplanet_server
./stop_pm2.test.sh
sleep 7
./startpm2.test.sh
sleep 5
./statuspm2.sh
