-DRYRUN=False
-
-if DRYRUN: SENDMAIL_COMMAND = ['/bin/cat']
-else: SENDMAIL_COMMAND = ['/usr/sbin/sendmail', '-t', '-oi']
-
-if DRYRUN: RM_COMMAND = ['/bin/echo', 'Would remove']
-else: RM_COMMAND = ['/bin/rm', '-rf']
-
-EXPLANATIONS = [
-u"""\
-{hostname}'s /home is, unfortunately, not infinite in size. If you have
-anything in there that you no longer need, please clean it up."""
-,u"""\
-Can you please look at your $HOME on {hostname} and remove files which
-you no longer need (such as old sources)."""
-,u"""\
-Thanks for your porting effort on {hostname}!
-
-Please note that on most porterboxes /home is quite small, so please remove
-files that you do not need anymore."""
- ]
+parser = OptionParser()
+parser.add_option("-D", "--dryrun",
+ action="store_true", default=False,
+ help="Dry run mode")
+
+parser.add_option("-d", "--debug",
+ action="store_true", default=False,
+ help="Enable debug output")
+
+(options, args) = parser.parse_args()
+options.section = 'dsa-homedirs'
+options.config = '/etc/dsa/pubsub.conf'
+if os.access(options.config, os.R_OK):
+ mq_config = Config(options)
+ mq_conf = {
+ 'rabbit_userid': mq_config.username,
+ 'rabbit_password': mq_config.password,
+ 'rabbit_virtual_host': mq_config.vhost,
+ 'rabbit_hosts': ['pubsub02.debian.org', 'pubsub01.debian.org'],
+ 'use_ssl': False
+ }
+else:
+ mq_config = None
+
+if options.dryrun:
+ SENDMAIL_COMMAND = ['/bin/cat']
+ RM_COMMAND = ['/bin/echo', 'Would remove']
+else:
+ SENDMAIL_COMMAND = ['/usr/sbin/sendmail', '-t', '-oi']
+ RM_COMMAND = ['/bin/rm', '-rf']