Additional configuration files.
This commit is contained in:
@@ -115,7 +115,9 @@ class Installer(object):
|
||||
else:
|
||||
dstname = ftpl
|
||||
src = self.get_file_path("{}.tpl".format(ftpl))
|
||||
dst = os.path.join(self.config_dir, dstname)
|
||||
dst = dstname
|
||||
if not dst.startswith("/"):
|
||||
dst = os.path.join(self.config_dir, dst)
|
||||
utils.copy_from_template(src, dst, context)
|
||||
|
||||
def restart_daemon(self):
|
||||
|
||||
28
modoboa_installer/scripts/files/modoboa/crontab.tpl
Normal file
28
modoboa_installer/scripts/files/modoboa/crontab.tpl
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Modoboa specific cron jobs
|
||||
#
|
||||
PYTHON=%{venv_path}/bin/python
|
||||
INSTANCE=%{instance_path}
|
||||
|
||||
# Operations on mailboxes
|
||||
* * * * * %{dovecot_mailboxes_owner} $PYTHON $INSTANCE/manage.py handle_mailbox_operations
|
||||
|
||||
# Sessions table cleanup
|
||||
0 0 * * * root $PYTHON $INSTANCE/manage.py clearsessions
|
||||
|
||||
# Logs table cleanup
|
||||
0 0 * * * root $PYTHON $INSTANCE/manage.py cleanlogs
|
||||
|
||||
{% if use_amavis %}
|
||||
# Quarantine cleanup
|
||||
0 0 * * * root $PYTHON $INSTANCE/manage.py qcleanup
|
||||
|
||||
# Notifications about pending release requests
|
||||
0 12 * * * root $PYTHON $INSTANCE/manage.py amnotify --baseurl='http://%{hostname}'
|
||||
{% endif %}
|
||||
|
||||
# Logs parsing
|
||||
*/5 * * * * root $PYTHON $INSTANCE/manage.py logparser &> /dev/null
|
||||
|
||||
# Radicale rights file
|
||||
*/2 * * * * root $PYTHON $INSTANCE/manage.py generate_rights
|
||||
1
modoboa_installer/scripts/files/modoboa/sudoers.tpl
Normal file
1
modoboa_installer/scripts/files/modoboa/sudoers.tpl
Normal file
@@ -0,0 +1 @@
|
||||
%{user} ALL=(%{dovecot_mailboxes_owner}) NOPASSWD: /usr/bin/doveadm
|
||||
@@ -19,6 +19,10 @@ class Modoboa(base.Installer):
|
||||
packages = [
|
||||
"python-dev", "libxml2-dev", "libxslt-dev", "libjpeg-dev",
|
||||
"librrd-dev", "rrdtool"]
|
||||
config_files = [
|
||||
"crontab=/etc/cron.d/modoboa",
|
||||
"sudoers=/etc/sudoers.d/modoboa",
|
||||
]
|
||||
with_db = True
|
||||
with_user = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user