Separate Plugin/RmPlugin modules.
raise NotImplementedError
end
- def delete_domain(domain)
- # Delete the given domain.
- raise NotImplementedError
- end
-
- def delete_account(account)
- # Delete the given account.
- raise NotImplementedError
- end
-
- def get_leftover_domains(db_domains)
- # Given a list of domains, determine which domains belonging to
- # this plugin are not contained in the given list.
- raise NotImplementedError
- end
-
- def get_leftover_accounts(db_accounts)
- # Given a list of accounts, determine which accounts belonging to
- # this plugin are not contained in the given list.
- raise NotImplementedError
- end
end
-# Load the rest of the code we'll use.
+# Load the rest of the code we'll use. This loads what we'll need in
+# the executables; the library files are supposed to require what they
+# need.
-# And the necessary classes.
-require 'mailshears/configuration'
-require 'mailshears/errors'
-require 'mailshears/exit_codes'
+require 'common/configuration'
+require 'common/errors'
+require 'common/exit_codes'
require 'mailshears/postfixadmin_db'
cfg = Configuration.new()
require 'pg'
+require 'common/plugin'
+require 'mailshears/rm_plugin'
+
class AgendavDb
include Plugin
+ include RmPlugin
def initialize()
cfg = Configuration.new()
require 'pg'
+require 'common/plugin'
+require 'mailshears/rm_plugin'
+
class DavicalDb
#
# DAViCal only supports Postgres, so even if we ever are
# database-agnostic, this plugin can't be.
#
include Plugin
+ include RmPlugin
def initialize()
cfg = Configuration.new()
# Needed for rm_rf.
require 'fileutils'
-require 'mailshears/configuration'
-require 'mailshears/errors'
-require 'mailshears/filesystem'
-require 'mailshears/mailstore'
-require 'mailshears/plugin'
+require 'common/filesystem'
+require 'common/mailstore'
+require 'common/plugin'
+require 'mailshears/rm_plugin'
class DovecotMailstore < Mailstore
include Plugin
+ include RmPlugin
def initialize
cfg = Configuration.new()
require 'pg'
+require 'common/plugin'
+require 'mailshears/rm_plugin'
+
class RoundcubeDb
include Plugin
+ include RmPlugin
def initialize()
cfg = Configuration.new()
--- /dev/null
+module RmPlugin
+ #
+ # Plugins for the removal of accounts.
+ #
+
+ def delete_domain(domain)
+ # Delete the given domain.
+ raise NotImplementedError
+ end
+
+ def delete_account(account)
+ # Delete the given account.
+ raise NotImplementedError
+ end
+
+ def get_leftover_domains(db_domains)
+ # Given a list of domains, determine which domains belonging to
+ # this plugin are not contained in the given list.
+ raise NotImplementedError
+ end
+
+ def get_leftover_accounts(db_accounts)
+ # Given a list of accounts, determine which accounts belonging to
+ # this plugin are not contained in the given list.
+ raise NotImplementedError
+ end
+end