I have recently made a Tcp-server in mono develop c#.
My computer runs Linux mint 17
I run this server using
sudo mono Desktop/server.exe
However it crashes every now and then, and I would like to make it restart upon crash, as I otherwise have to go home to my computer to restart it when it crashes.
I realize this is not a stable solution, but it'll do for now.
I've heard of UpStart, but couldn't really understand the documentation.
When I start my program through terminal I can't see any new processes pop up in System Monitor, so I don't know the name of the process of the program either.
(I have been searching around quite a lot, and tried upstart a bunch, but I've had no success with any of my tries. Not even finding the name of the servers process)
Is there an easy way to detect if my program is running, and if not restart it automatically?