Skip to content

Instantly share code, notes, and snippets.

View emsearcy's full-sized avatar

Eric Searcy emsearcy

  • 04:10 (UTC -08:00)
View GitHub Profile
@emsearcy
emsearcy / README.md
Last active June 8, 2022 02:50
Ansible role to install certbot in a virtualenv + non-root user

certbot

This role installs certbot in a virtualenv with automated certificate renewal.

Running certbot as a non-root user and in a virtualenv provides extra security.

Web server configuration

#!/bin/bash
# Downtimes are third Sunday of the month. In order to plan
# for upgrades and reboots, we email ourselves the list of all
# outstanding security updates for each system on the 2nd
# Wednesday of the month.
# Critical security update alerts are sent daily.
# Requires yum-plugin-security and mailx.
WEEKOFMONTH=$((($(date +%d)-1)/7+1))
DAYOFWEEK=$(date +%u)
@tvwerkhoven
tvwerkhoven / rsync_backup.sh
Last active July 5, 2023 05:30 — forked from necolas/rsync_backup
Improved script: - Check if run as root - Clarify rsync(1) flags - Add --inplace for performance, extra preservation flags - Check bless(8) target before setting Improved exclusion file: - Included files listed by Carbon Copy Cloner
#!/bin/bash
#
# This script backups an OS X system to an external volume, effectively
# cloning it. It is based on [0], [1] and [2] for OS X and [3] and [4] for
# Linux. One could also use commercial tools like SuperDuper! or Carbon Copy
# Cloner. The latter website has an interesting list[5] on what files to
# exclude when cloning.
#
# Exclusions (from CCC[5]), see rsync_excludes_osx.txt
#