#!/bin/bash

ps waux | grep node | grep -v grep

echo "stopping ..."
if [ "$(id -u)" != "0" ]; then
	sudo forever stopall
fi
forever stopall

sleep 3
ps waux | grep node | grep -v grep

sleep 1
cp log.txt log-$(date +%s).txt
cd etherpad-lite/node
cp log.txt log-$(date +%s).txt
