add new script and cron
This commit is contained in:
parent
fc84d0e540
commit
144a7a499a
2 changed files with 11 additions and 0 deletions
10
roles/taiga/files/backup-cert.sh
Normal file
10
roles/taiga/files/backup-cert.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
# backup letsencrypt certificate
|
||||
|
||||
BACKUPDIR=/backups
|
||||
# create backup
|
||||
/usr/bin/tar Pczf /$BACKUPDIR/letsencrypt-$(date +%F).tgz /etc/letsencrypt
|
||||
|
||||
# delete the backup three weeks ago.
|
||||
rm -f /$BACKUPDIR/letsencrypt-$(date --date="3 weeks ago" +%F).tgz
|
||||
|
1
roles/taiga/files/cron-backup-cert
Normal file
1
roles/taiga/files/cron-backup-cert
Normal file
|
@ -0,0 +1 @@
|
|||
* * * * 0 root /usr/local/bin/backup-cert.sh
|
Loading…
Add table
Add a link
Reference in a new issue