Skip to content

Instantly share code, notes, and snippets.

@stepansantalov
stepansantalov / gist:51b6c26674cc07dcba7ed239e928eea0
Created June 21, 2018 11:24
Automatic LetsEncrypt certificate update for /etc/cron.monthly/
#!/bin/bash
temp_file="/tmp/cbrn.txt"
email=""
certbot renew > $temp_file 2>&1
mail -s "Letsencrypt certificates renewal" $email < $temp_file
rm $temp_file
service nginx reload
@stepansantalov
stepansantalov / auto-backup-ftp.rsc
Last active June 21, 2018 11:22 — forked from ranzhe/auto-backup-ftp.rsc
Automatic FTP backup script for Mikrotik RouterOS
:local saveUserDB true
:local saveSysBackup true
:local encryptSysBackup false
:local saveRawExport true
:local FTPServer "ftp.domain.tld"
:local FTPPort 21
:local FTPUser "mikrotik"
:local FTPPass "secretpass"