Mailman shortcut working
[hcoop/domtool2.git] / src / plugins / mailman.sml
index 5244682..12d92a0 100644 (file)
@@ -28,6 +28,14 @@ val () = Env.type_one "mailman_web_node"
 
 val dl = ErrorMsg.dummyLoc
 
+val () = Env.registerFunction ("mailman_web_node",
+                              fn [] => SOME (EString Config.Mailman.node, dl)
+                               | _ => NONE)
+
+val () = Env.registerFunction ("mailman_web_node_to_node",
+                           fn [e] => SOME e
+                            | _ => NONE)
+
 val () = Defaults.registerDefault
             ("MailmanWebNodes",
              (TList (TBase "mailman_web_node", dl), dl),
@@ -118,9 +126,14 @@ val () = Env.actionV_one "mailmanVhost"
                             print "        Order allow,deny\n";
                             print "        Allow from all\n";
                             print "    </Directory>\n";
+
+                            Apache.doPre {user = user, nodes = nodes, id = vhostId, hostname = fullHost};
+
                             print "</VirtualHost>\n";
 
-                            TextIO.closeOut file
+                            TextIO.closeOut file;
+
+                            Apache.doPost ()
                         end) nodes
             end)