-SERVICE="$1"
-#echo remctl black-mesa remote "$TYPE" "$@"
-case "$SERVICE" in
- listvms ) shift; sipb-xen-remote-listvms "$@" ;;
- * ) remctl black-mesa remote "$TYPE" "$@" ;;
+case "$TYPE" in
+ control )
+ SERVICE="$2" ;;
+ * )
+ SERVICE="$1" ;;
+esac
+
+case "$TYPE/$SERVICE" in
+ web/listvms )
+ shift; sipb-xen-remote-listvms "$@" ;;
+ * )
+ remctl black-mesa remote "$TYPE" "$@" ;;