diff --git a/certbot/configuration.py b/certbot/configuration.py index 30c6f0437..297795609 100644 --- a/certbot/configuration.py +++ b/certbot/configuration.py @@ -108,6 +108,30 @@ class NamespaceConfig(object): return os.path.join( self.namespace.config_dir, constants.RENEWAL_CONFIGS_DIR) + @property + def renewal_hooks_dir(self): + """Path to directory with hooks to run with the renew subcommand.""" + return os.path.join(self.namespace.config_dir, + constants.RENEWAL_HOOKS_DIR) + + @property + def renewal_pre_hooks_dir(self): + """Path to the pre-hook directory for the renew subcommand.""" + return os.path.join(self.renewal_hooks_dir, + constants.RENEWAL_PRE_HOOKS_DIR) + + @property + def renewal_deploy_hooks_dir(self): + """Path to the deploy-hook directory for the renew subcommand.""" + return os.path.join(self.renewal_hooks_dir, + constants.RENEWAL_DEPLOY_HOOKS_DIR) + + @property + def renewal_post_hooks_dir(self): + """Path to the post-hook directory for the renew subcommand.""" + return os.path.join(self.renewal_hooks_dir, + constants.RENEWAL_POST_HOOKS_DIR) + def check_config_sanity(config): """Validate command line options and display error message if