diff options
-rw-r--r-- | rpkid/examples/rpki.conf | 15 | ||||
-rw-r--r-- | rpkid/rpki-sql-backup.py | 6 | ||||
-rw-r--r-- | rpkid/rpki-sql-setup.py | 9 | ||||
-rw-r--r-- | rpkid/rpki-start-servers.py | 10 |
4 files changed, 31 insertions, 9 deletions
diff --git a/rpkid/examples/rpki.conf b/rpkid/examples/rpki.conf index 74436fff..37a5230c 100644 --- a/rpkid/examples/rpki.conf +++ b/rpkid/examples/rpki.conf @@ -95,6 +95,21 @@ publication_rsync_module = rpki publication_rsync_server = ${myrpki::pubd_server_host} +# Startup control. These all default to the values of the +# corresponding run_* options, to keep things simple. The only case +# where you would want to change these is when you are running the +# back-end code on a different machine from one or more of the +# daemons, in which case you need finer control over which daemons to +# start on which machines. In such cases, "run_*" controls whether +# the back-end code is doing things to manage the daemon in question, +# while "start_*" controls whether rpki-start-servers attempts to +# start the daemon in question. + +start_rpkid = ${myrpki::run_rpkid} +start_irdbd = ${myrpki::run_rpkid} +start_pubd = ${myrpki::run_pubd} +start_rootd = ${myrpki::run_rootd} + # SQL configuration. You can ignore this if you're not running any of # the daemons yourself. diff --git a/rpkid/rpki-sql-backup.py b/rpkid/rpki-sql-backup.py index 0a7c9594..b6e7320a 100644 --- a/rpkid/rpki-sql-backup.py +++ b/rpkid/rpki-sql-backup.py @@ -45,9 +45,11 @@ def dump(section): "-p" + cfg.get("sql-password", section = section), "-B", cfg.get("sql-database", section = section))) -if cfg.getboolean("run_rpkid", False): +if cfg.getboolean("start_rpkid", False): dump("irdbd") + +if cfg.getboolean("start_irdbd", False): dump("rpkid") -if cfg.getboolean("run_pubd", False): +if cfg.getboolean("start_pubd", False): dump("pubd") diff --git a/rpkid/rpki-sql-setup.py b/rpkid/rpki-sql-setup.py index 0a900399..be138b0e 100644 --- a/rpkid/rpki-sql-setup.py +++ b/rpkid/rpki-sql-setup.py @@ -85,10 +85,13 @@ cfg = rpki.config.parser(cfg_file, "myrpki") rootdb = MySQLdb.connect(db = "mysql", user = "root", passwd = getpass.getpass("Please enter your MySQL root password: ")) -sql_setup("irdbd") -sql_setup("rpkid") +if cfg.getboolean("start_irdbd", False): + sql_setup("irdbd") -if cfg.getboolean("run_pubd", False): +if cfg.getboolean("start_rpkid", False): + sql_setup("rpkid") + +if cfg.getboolean("start_pubd", False): sql_setup("pubd") rootdb.close() diff --git a/rpkid/rpki-start-servers.py b/rpkid/rpki-start-servers.py index 54e1f438..ce2b7a0b 100644 --- a/rpkid/rpki-start-servers.py +++ b/rpkid/rpki-start-servers.py @@ -4,7 +4,7 @@ which servers the user wants started. $Id$ -Copyright (C) 2009--2010 Internet Systems Consortium ("ISC") +Copyright (C) 2009--2012 Internet Systems Consortium ("ISC") Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -72,12 +72,14 @@ def run(name): else: print "Problem starting %r, pid %s" % (name, proc.pid) -if cfg.getboolean("run_rpkid", False): +if cfg.getboolean("start_rpkid", False): run("irdbd") + +if cfg.getboolean("start_irdbd", False): run("rpkid") -if cfg.getboolean("run_pubd", False): +if cfg.getboolean("start_pubd", False): run("pubd") -if cfg.getboolean("run_rootd", False): +if cfg.getboolean("start_rootd", False): run("rootd") |