Index: /main/waeup.stress/trunk/kofa01/config.cfg
===================================================================
--- /main/waeup.stress/trunk/kofa01/config.cfg	(revision 8680)
+++ /main/waeup.stress/trunk/kofa01/config.cfg	(revision 8681)
@@ -10,5 +10,5 @@
 kofa_instance = kofa
 kofa_baseport = 8080
-
+kofa_instance_mode = paster
 
 [user_group-1]
Index: /main/waeup.stress/trunk/kofa01/post_run.py
===================================================================
--- /main/waeup.stress/trunk/kofa01/post_run.py	(revision 8680)
+++ /main/waeup.stress/trunk/kofa01/post_run.py	(revision 8681)
@@ -1,7 +1,18 @@
-## Actions to do after test runs.
+"""Script run after tests have been done.
+
+This script is run with some additional globals set:
+
+- project_name: The name of this project (dir)
+- cmd_opts: Commandline args from stress-run invocation
+  Includes the stresstest-project directory.
+- cfg_opts: options as set in local config.cfg.
+
+Context Python is normally the version used when running bootstrap on
+the waeup.stress package.
+"""
 import waeup.stress
 
-instance = 'kofa'
+instance=cfg_opts['instance']
+mode = cfg_opts['instance_mode']
 
-waeup.stress.stop_instance(instance)
-waeup.stress.configure()
+waeup.stress.stop_instance(instance, mode=mode)
Index: /main/waeup.stress/trunk/kofa01/pre_run.py
===================================================================
--- /main/waeup.stress/trunk/kofa01/pre_run.py	(revision 8680)
+++ /main/waeup.stress/trunk/kofa01/pre_run.py	(revision 8681)
@@ -14,4 +14,6 @@
 
 instance=cfg_opts['instance']
+mode = cfg_opts['instance_mode']
+
 print "PRE-RUN.PY: using instance: waeup.%s" % instance
 
@@ -23,5 +25,5 @@
 
 ## starts an instance as daemon
-waeup.stress.start_instance(instance)
+waeup.stress.start_instance(instance, mode=mode)
 ## wait for instance to come up
 waeup.stress.wait_for_startup(cfg_opts['host'], int(cfg_opts['baseport']))
Index: /main/waeup.stress/trunk/src/waeup/stress/__init__.py
===================================================================
--- /main/waeup.stress/trunk/src/waeup/stress/__init__.py	(revision 8680)
+++ /main/waeup.stress/trunk/src/waeup/stress/__init__.py	(revision 8681)
@@ -68,12 +68,26 @@
     return
 
-def start_instance(name):
+def start_instance(name, mode='paster'):
+    """Start instance `name` in `mode`.
+
+    The `name` should be someone like 'kofa', 'uniben', etc. where
+    ``waeup.<NAME>`` is an existent instance in the `instances/`
+    directory.
+
+    `mode` can be one of `paster`|`kofactl` and tells how to start the
+    instance.
+    """
     path = kofa_projects[name]
-    print "WAEUP.STRESS: starting instance %s at %s" % (name, path)
+    print "WAEUP.STRESS: starting instance %s at %s using %s" % (
+        name, path, mode),
     old_cwd_ = os.getcwd()
     os.chdir(path)
     # yes, shell _is_ neccessary here
-    subprocess.call(
-        './bin/paster serve --daemon parts/etc/debug.ini', shell=True)
+    if mode == 'kofactl':
+        subprocess.call('./bin/kofactl start', shell=True)
+    else:
+        # by default we start paster as daemon
+        subprocess.call(
+            './bin/paster serve --daemon parts/etc/debug.ini', shell=True)
     os.chdir(old_cwd_)
     return
@@ -92,10 +106,24 @@
     return
 
-def stop_instance(name):
+def stop_instance(name, mode='paster'):
+    """Stop instance `name` in `mode`.
+
+    The `name` should be someone like 'kofa', 'uniben', etc. where
+    ``waeup.<NAME>`` is an existent instance in the `instances/`
+    directory.
+
+    `mode` can be one of `paster`|`kofactl` and tells which tool to
+    use to stop the instance.
+    """
     path = kofa_projects[name]
-    print "WAEUP.STRESS: shutting down instance %s at %s" % (name, path),
+    print "WAEUP.STRESS: shutting down instance %s at %s using %s" % (
+        name, path, mode),
     old_cwd_ = os.getcwd()
     os.chdir(path)
-    subprocess.call(
+    if mode == 'kofactl':
+        subprocess.call('./bin/kofactl stop', shell=True)
+    else:
+        # by default we use paster
+        subprocess.call(
         './bin/paster serve --stop-daemon', shell=True)
     print "... done."
