cpen321-recipe-roulette / server / server_check.sh
server_check.sh
Raw
#!/bin/bash
while true
do
	while [ "$(ps -a | grep "node")" != "" ]
	do
		echo "$(ps -a | grep "node")"
		sleep 5
	done
	date >> public/crashes.txt
	screen -dm bash -c "npm start"
	sleep 5
done