X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fbackupninja.git;a=blobdiff_plain;f=src%2Fbackupninja;h=a77242d55a14df5b610324da43bce7dab3df59db;hp=e351c62acd9afd171be82135dc554d74e2b8145e;hb=b99a9b8625f0543f2def8cd66273e3541e7d5e83;hpb=75bf976607685eddaaab1d5239408b8f545ce158 diff --git a/src/backupninja b/src/backupninja index e351c62..a77242d 100755 --- a/src/backupninja +++ b/src/backupninja @@ -35,7 +35,30 @@ log = logging.getLogger() def make_option_parser(): description = """%prog checks for scheduled actions and runs them when needed.""" parser = optparse.OptionParser(description=description) - + parser.add_option( "-c", "--confdir" + , help="Load configuration from CONFIG_DIR " + "instead of '%default'. When " + "the --conffile or --actionsdir options " + "specify relative paths, they are taken " + "relative to this directory." + , default="/etc/backupninja" + , dest="config_dir" + , metavar="CONFIG_DIR") + parser.add_option( "-f", "--conffile" + , help="Load the main configuration from FILE instead " + "of '%default'. If FILE is a relative path, it " + "is interpreted relative to CONFIG_DIR." + , default='backupninja.conf' + , dest="global_config" + , metavar="FILE") + parser.add_option( "-a", "--actionsdir" + , help="Load action configurations from ACTIONS_DIR " + "instead of '%default'. If ACTIONS_DIR is a " + "relative path, it is interpreted relative to " + "CONFIG_DIR." + , default="actions" + , dest="actions_dir" + , metavar="ACTIONS_DIR") return parser def main(argv):