Add "IGNORED" state to actions on list members
This commit is contained in:
parent
1c8eb14154
commit
2758ba5982
1 changed files with 10 additions and 6 deletions
|
@ -76,30 +76,34 @@ def main
|
|||
if (subscribers.include?(m))
|
||||
subscribers.delete(m)
|
||||
else
|
||||
if (conf["lists_add"].include?(cn))
|
||||
print "Adding #{m}... "
|
||||
if (conf["lists_add"].include?(cn))
|
||||
mlmmj_sub_binary = conf["mlmmj"]["sub_binary"]
|
||||
%x(#{mlmmj_sub_binary} -L #{list} -a #{m} -q -f -s)
|
||||
if ($?.exitstatus == 0)
|
||||
puts "OK"
|
||||
else
|
||||
puts "Failed"
|
||||
puts "FAILED"
|
||||
end
|
||||
else
|
||||
puts "IGNORED"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Remove remaining "subcribers" (= they did not match with members)
|
||||
if (conf["lists_remove"].include?(cn))
|
||||
subscribers.each do |s|
|
||||
print "Removing #{s}... "
|
||||
if (conf["lists_remove"].include?(cn))
|
||||
mlmmj_unsub_binary = conf["mlmmj"]["unsub_binary"]
|
||||
%x(#{mlmmj_unsub_binary} -L #{list} -a #{s} -q -s)
|
||||
if ($?.exitstatus == 0)
|
||||
puts "OK"
|
||||
else
|
||||
puts "Failed"
|
||||
puts "FAILED"
|
||||
end
|
||||
else
|
||||
puts "IGNORED"
|
||||
end
|
||||
end
|
||||
print "\n"
|
||||
|
|
Loading…
Reference in a new issue