Add logrotate
support for backup apps
This commit is contained in:
parent
a76d38c201
commit
cde124b916
2 changed files with 16 additions and 0 deletions
|
@ -66,6 +66,7 @@ def deploy_backup_app(c, deploy, envname, mkvirtualenv=True, user='rattail',
|
|||
everything=None,
|
||||
crontab=None,
|
||||
runat=UNSPECIFIED,
|
||||
logrotate=False,
|
||||
context={}):
|
||||
"""
|
||||
Make an app which can run backups for the server.
|
||||
|
@ -228,3 +229,8 @@ def deploy_backup_app(c, deploy, envname, mkvirtualenv=True, user='rattail',
|
|||
deploy(c, crontab, '/etc/cron.d/backup', context=crontab_context, use_sudo=True)
|
||||
else:
|
||||
deploy_generic(c, 'backup/crontab.mako', '/etc/cron.d/backup', context=crontab_context, use_sudo=True)
|
||||
|
||||
# logrotate
|
||||
if logrotate:
|
||||
deploy_generic(c, 'backup/logrotate.conf', '/etc/logrotate.d/backup',
|
||||
use_sudo=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue