add new script and cron

This commit is contained in:
doteast 2016-11-09 16:56:55 +00:00
parent fc84d0e540
commit 144a7a499a
2 changed files with 11 additions and 0 deletions

View 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

View file

@ -0,0 +1 @@
* * * * 0 root /usr/local/bin/backup-cert.sh