X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Frm%2Frm_dummy_runner.rb;h=9bdd13f5f47fb2dc1b71e7c012545c47c08e7e4a;hp=c79e0467984198e903eef70ae296fae91dc17c60;hb=51f027b01e242737956c3ab5aecdd322d6ceeeed;hpb=a6ae98f0423603445b621a8eaa17443c8d590b45 diff --git a/lib/rm/rm_dummy_runner.rb b/lib/rm/rm_dummy_runner.rb index c79e046..9bdd13f 100644 --- a/lib/rm/rm_dummy_runner.rb +++ b/lib/rm/rm_dummy_runner.rb @@ -1,16 +1,22 @@ +require 'common/runner' + class RmDummyRunner include Runner - def run(plugin, targets) + def run(plugin, *targets) targets.each do |target| if target.include?('@') then puts "Would remove account: #{target}" + # TODO: remove from postfixadmin as well. else + usernames = plugin.get_domain_usernames(target) + usernames.each { |u| run(plugin, u) } + puts "Would remove domain: #{target}" + # TODO: remove from postfixadmin as well. end end - # TODO: remove from postfixadmin as well. end end