# # # patch "doc/documentation.html" # from [4527ce7daac995536fa085624b70c3ccbea7cb3b] # to [8fa162b604a4b395d0acba60c8b78dfd4ed88a57] # # patch "src/administrator.cc" # from [9a961611868513551cb1d8fb91c4435002153bcd] # to [72123cb2f5117a814feeef5b81ecd2042486fd9b] # # patch "src/administrator.hh" # from [8a76353507cb98bafdedbc4ea056c2f839846408] # to [9939b5ded272f98a384f1d4fe2df0c151d43c0a7] # ============================================================ --- src/administrator.cc 9a961611868513551cb1d8fb91c4435002153bcd +++ src/administrator.cc 72123cb2f5117a814feeef5b81ecd2042486fd9b @@ -349,6 +349,7 @@ administrator::reload_conffile() return; map > opts = defaults::defaults; admins.clear(); + scripts.clear(); string ap, sp; if (serverport == -1) sp = defaults::listenport; @@ -370,6 +371,18 @@ administrator::reload_conffile() if (!i->values.empty()) sp = i->values[0].parsed; } + else if (i->key == "script") + { + if (i->values.size() >= 2) + { + vector::const_iterator v = i->values.begin(); + string const & name = v->parsed; + vector argv; + for (++v; v != i->values.end(); ++v) + argv.push_back(v->parsed); + scripts.insert(make_pair(name, argv)); + } + } else { vector vals; ============================================================ --- src/administrator.hh 8a76353507cb98bafdedbc4ea056c2f839846408 +++ src/administrator.hh 9939b5ded272f98a384f1d4fe2df0c151d43c0a7 @@ -21,6 +21,8 @@ using std::map; using std::string; #include using std::map; +#include +using std::vector; struct administrator { @@ -35,6 +37,7 @@ struct administrator }; list > conns; map admins; + map > scripts; server_manager &manager; string conffile; administrator(server_manager &sm, string const &cf); ============================================================ --- doc/documentation.html 4527ce7daac995536fa085624b70c3ccbea7cb3b +++ doc/documentation.html 8fa162b604a4b395d0acba60c8b78dfd4ed88a57 @@ -3,6 +3,7 @@ + Usher Documentation

Introduction

@@ -47,7 +48,7 @@ The configuration file for usher approxi The configuration file for usher approximately follows monotone's "basic_io" format. A sample config file is:
-
userpass 	"username" "password"
monotone "mtn" "-k" "my_key"
listenaddr "0.0.0.0:4691"
adminaddr "127.0.0.1:12345"
logdir "/var/log/usher/"

server "monotone"
host "localhost"
pattern "net.venge.monotone"
remote "66.96.28.3:4691"

server "local"
host "127.0.0.1"
pattern "*"
local "-d" "/usr/local/src/managed/my.db"
+
userpass 	"username" "password"
monotone "mtn" "-k" "my_key"
listenaddr "0.0.0.0:4691"
adminaddr "127.0.0.1:12345"
logdir "/var/log/usher/"
script "name" "exe" "arg" "arg"

server "monotone"
host "localhost"
pattern "net.venge.monotone"
remote "66.96.28.3:4691"

server "local"
host "127.0.0.1"
pattern "*"
local "-d" "/usr/local/src/managed/my.db"
There is an initial section for global settings, followed by any number of sections each starting with a "server" line.
@@ -67,8 +68,12 @@ The default is listenaddr "0.0.0.0:4691".
logdir "/path/for/log/files/"
A path (ending with a slash) where per-server logfiles for local servers should be stored.
-The default is logdir "./".
+The default is logdir "./".
script "name" "exe" "arg" "arg"
+
A script that can be executed by given the "RUN" command on the +administrative interface. Any arguments specified in the config file +will be given before any arguments given to the "RUN" command.
+

Per-server directives