Skip to content

Instantly share code, notes, and snippets.

View Telling's full-sized avatar

Stephan Telling Telling

View GitHub Profile
@Telling
Telling / le-renew-webroot
Last active March 6, 2016 11:23 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin with multiple configurations and more.
#!/usr/bin/env bash
# exit on error
set -e
# unset vars
unset configs
unset letsencrypt_path
# Arguments parsing
#!/bin/bash
hosts=(
ftp.dk.debian.org
ftp.cn.debian.org
)
for host in ${hosts[@]}; do
IP=`nslookup $host | sed 's/Address: //' | tail -n 2 | head -n 1`
echo ==== TESTING $IP \($host\) ====
echo Ping: `ping -c 64 $IP | grep rtt`