Added missing sleep to while loop in main()
Added command to exit (and restart) service