Signal handler for the server implemented

Now when the system is brought down the server and the
run clients will turn off properly