Browse Source

added restart support

git-svn-id: https://svn.kenai.com/svn/winsw~subversion/trunk@4 c8b2a3fe-9b5b-6a51-a37e-dc31b0e308fa
kohsuke 17 years ago
parent
commit
3d280921fd
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Main.cs

+ 7 - 0
Main.cs

@@ -311,6 +311,13 @@ namespace winsw
                     if (s == null) ThrowNoSuchService();
                     s.StopService();
                 }
+                if (args[0] == "restart")
+                {
+                    if (s == null) ThrowNoSuchService();
+                    if(s.Started)
+                        s.StopService();
+                    s.StartService();
+                }
                 if (args[0] == "status")
                 {
                     if (s == null)