Skip to content

Instantly share code, notes, and snippets.

View itay-grudev's full-sized avatar

Itay Grudev itay-grudev

View GitHub Profile
@itay-grudev
itay-grudev / dns-do.hook
Created April 1, 2017 11:34
Acmetool ACME (Let's Encrypt) DNS hook using the Digital Ocean API
#!/bin/bash
# This is an example DNS hook script which uses the Digital Ocean API to
# update nameservers. The script waits until updates have propagated to all
# nameservers listed for a zone. The script fails if this takes more than 60
# seconds by default; this timeout can be adjusted.
#
# Requirements: dig (bind-tools), jq
#
# The script is ready to use, but to use it you must create
# /etc/default/acme-dns-do or /etc/conf.d/acme-dns-do and set the following options:
@itay-grudev
itay-grudev / dodyndns.sh
Last active February 27, 2018 14:16
Bash Script for free reliable Dynamic DNS (DynDNS) using the Digital Ocean API
#!/bin/bash
##
# This script check whether the server's public IP has changed and updates an
# A DNS record with the Digital Ocean API.
# /etc/dodyndns configuration file:
# SERVER_IP=127.0.0.1
# RECORD_ID=
#
# DYNDNS_DOMAIN_PREFIX=dyndns
@itay-grudev
itay-grudev / certbot-auto.service
Last active April 4, 2019 01:08
certbot-auto systemd timer
[Unit]
Description=Renew SSL certificates via Lets Encrypt using certbot-auto
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/certbot-auto renew