- plugin_class = PrunePlugin
- runner_class = PruneRunner
- dummy_runner_class = PruneDummyRunner
-end
-
-puts make_header(plugin_class.to_s())
-
-plugin_class.includers.each do |plugin_class_includer|
- plugin = plugin_class_includer.new()
-
- if cfg.i_mean_business then
- runner = runner_class.new()
- else
- runner = dummy_runner_class.new()
- end
-
- # The splat passes the correct (we hope) number of arguments to the
- # appropriate runner. The Rm(Dummy)Runner have splats on their
- # *target arguments as well, to turn ARGV back into an array.
- runner.run(plugin, *ARGV)
-
- puts ""
-end
-
-
-
-Kernel.exit(0)
-
-
-begin
- # Get a list of domains from the Postfixadmin database.
- db_domains = pgadb.get_domains_from_db()
-rescue DatabaseError => e
- puts "There was an error connecting to the database: #{e.to_s}"
- Kernel.exit(ExitCodes::DATABASE_ERROR)
-end
-
-begin
- # And the accounts.
- db_accounts = pgadb.get_accounts_from_db()
-rescue DatabaseError => e
- puts "There was an error connecting to the database: #{e.to_s}"
- Kernel.exit(ExitCodes::DATABASE_ERROR)