Class: PruneRunner
Overview
Perform the pruning of users/domains using PrunePlugins.
Instance Method Summary collapse
-
#run(cfg, plugin) ⇒ Object
Run plugin to prune leftover users and directories.
Methods included from Runner
#add_description, #pointless?, #report
Instance Method Details
#run(cfg, plugin) ⇒ Object
Run plugin to prune leftover users and directories.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/prune/prune_runner.rb', line 17 def run(cfg, plugin) # We don't want to check the PostfixAdmin database against itself. return if plugin.class == PostfixadminPrune pfa = PostfixadminPrune.new(cfg) db_users = pfa.list_users() db_domains = pfa.list_domains() leftovers = plugin.get_leftover_users(db_users) leftovers += plugin.get_leftover_domains(db_domains) # We're counting on our PrunePlugin also being an RmPlugin here. rm_runner = RmRunner.new() rm_runner.run(cfg, plugin, *leftovers) end |