diff --git a/sigil/gogo/junit/sigil.properties b/sigil/gogo/junit/sigil.properties
index b305d9e..b569438 100644
--- a/sigil/gogo/junit/sigil.properties
+++ b/sigil/gogo/junit/sigil.properties
@@ -16,5 +16,6 @@
 	org.apache.tools.ant;version=1.7.0, \
 	org.osgi.framework;version=1.5.0, \
 	org.osgi.service.command;version=0.2.0, \
+	org.osgi.util.tracker;version=1.3.2, \
 
 # end
diff --git a/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/Activator.java b/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/Activator.java
index fe3a78d..16a473d 100644
--- a/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/Activator.java
+++ b/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/Activator.java
@@ -19,21 +19,48 @@
 package org.apache.felix.sigil.gogo.junit;
 
 import java.util.Hashtable;
+import java.util.Map;
 
+import org.apache.felix.sigil.junit.server.JUnitService;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
 
 import org.osgi.service.command.CommandProcessor;
+import org.osgi.util.tracker.ServiceTracker;
 
 public class Activator implements BundleActivator
 {
 
-    public void start( BundleContext ctx ) throws Exception
+    public void start( final BundleContext ctx ) throws Exception
     {
-        Hashtable props = new Hashtable();
+        final Hashtable props = new Hashtable();
         props.put(CommandProcessor.COMMAND_SCOPE, "sigil");
-        props.put(CommandProcessor.COMMAND_FUNCTION, new String[] { "junit" });        
-        ctx.registerService( SigilJunit.class.getName(), new SigilJunit(), props );
+        props.put(CommandProcessor.COMMAND_FUNCTION, new String[] { "junit" });
+        
+        ServiceTracker tracker = new ServiceTracker(ctx, JUnitService.class.getName(), null) {
+            private Map<ServiceReference, ServiceRegistration> regs;
+
+            @Override
+            public Object addingService( ServiceReference reference )
+            {
+                JUnitService svc = ( JUnitService ) super.addingService( reference );
+                ServiceRegistration reg = ctx.registerService( SigilJunit.class.getName(), new SigilJunit(svc), props );
+                regs.put(reference, reg);
+                return svc;
+            }
+
+            @Override
+            public void removedService( ServiceReference reference, Object service )
+            {
+                ServiceRegistration reg = regs.remove( reference );
+                reg.unregister();
+                super.removedService( reference, service );
+            }
+            
+        };
+        tracker.open();
     }
 
     public void stop( BundleContext ctx ) throws Exception
diff --git a/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilJunit.java b/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilJunit.java
index a659499..829a4d0 100644
--- a/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilJunit.java
+++ b/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilJunit.java
@@ -46,9 +46,13 @@
         OPTIONS.addOption("q", "quiet", false, "Run tests quietly, i.e. don't print steps to console" );
     }
     
-    private JUnitService service;
+    private final JUnitService service;
+    
+    public SigilJunit(JUnitService service) {
+        this.service = service;
+    }
 
-    public void junit(String[] args) throws IOException, ParseException {
+    public boolean junit(String[] args) throws IOException, ParseException {
         Parser p = new GnuParser();
         CommandLine cmd = p.parse(OPTIONS, args);
         String[] cargs = cmd.getArgs();
@@ -57,6 +61,7 @@
                 System.out.println( "\t" + t );
                 System.out.flush();
             }
+            return true;
         }
         else {
             boolean quiet = cmd.hasOption( 'q' );
@@ -68,11 +73,11 @@
                 System.out.println( "Writing results to " + dir.getAbsolutePath() );
                 System.out.flush();
             }
-            runTests( cargs, quiet, dir );
+            return runTests( cargs, quiet, dir );
         }
     }
     
-    private void runTests(String[] args, boolean quiet, File dir) throws IOException {
+    private boolean runTests(String[] args, boolean quiet, File dir) throws IOException {
         int count = 0;
         int failures = 0;
         int errors = 0;
@@ -123,6 +128,8 @@
         
         System.out.println( "Ran " + count + " tests. " + failures + " failures " + errors + " errors." );
         System.out.flush();
+        
+        return failures + errors == 0;
     }
 
     private TestSuite[] findTests(String t) {
