aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2009-08-23 22:31:06 +0000
committerRob Austein <sra@hactrn.net>2009-08-23 22:31:06 +0000
commit26c0da633aacc4533c11ab0d6eb6283aaaf49727 (patch)
tree73832e35ca92b8cc036d64795ff7d42a673f3d7e
parent1f988bc7c5c7135dc8ee02d4a234b79cc8040184 (diff)
Add publication rsync URI
svn path=/myrpki/children-to-pubclients.py; revision=2698
-rw-r--r--myrpki/children-to-pubclients.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/myrpki/children-to-pubclients.py b/myrpki/children-to-pubclients.py
index af0475d7..025d3d42 100644
--- a/myrpki/children-to-pubclients.py
+++ b/myrpki/children-to-pubclients.py
@@ -20,7 +20,23 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
"""
-import sys, csv, myrpki
+import sys, csv, myrpki, getopt, time, os, rpki.config
+
+os.environ["TZ"] = "UTC"
+time.tzset()
+
+cfg_file = "myrpki.conf"
+
+opts, argv = getopt.getopt(sys.argv[1:], "c:h?", ["config=", "help"])
+for o, a in opts:
+ if o in ("-h", "--help", "-?"):
+ print __doc__
+ sys.exit(0)
+ if o in ("-c", "--config"):
+ cfg_file = a
+
+base = rpki.config.parser(cfg_file, "myirbe").get("rsync_base")
csv.writer(sys.stdout, dialect = myrpki.csv_dialect).writerows(
- (handle, cert) for handle, expiration, cert in myrpki.csv_open("children.csv"))
+ (handle, cert, "%s/children/%s/" % (base.rstrip("/"), handle))
+ for handle, expiration, cert in myrpki.csv_open("children.csv"))