Skip to content

Instantly share code, notes, and snippets.

View erenfro's full-sized avatar
💭
Rocking my Docker Swarm Cluster!

Eric Renfro erenfro

💭
Rocking my Docker Swarm Cluster!
View GitHub Profile
@erenfro
erenfro / certbot-renew
Last active June 14, 2017 16:21
Lets Encrypt Automation with SystemD
#!/bin/bash
script_name=$(readlink -e $0)
script_dir=$(dirname $script_name)
if [[ -d "${PWD}/pre.d" || -d "${PWD}/post.d" ]]; then
hook_dir="${PWD}"
elif [[ -d "${script_dir}/pre.d" || -d "${script_dir}/post.d" ]]; then
hook_dir="${script_dir}"
elif [[ -d "/etc/letsencrypt/pre.d" || -d "/etc/letsencrypt/post.d" ]]; then