Skip to content

Instantly share code, notes, and snippets.

View bklang's full-sized avatar

Ben Klang bklang

View GitHub Profile
#!/usr/bin/env bash
# LetsEncrypt certbot refresh hook for Unifi and Unifi Video
# Place this into /etc/letsencrypt/renewal-hooks/post/ and make it executable
# Inspired by script from here: https://source.sosdg.org/brielle/lets-encrypt-scripts
# Author: Ben Klang <bklang@wirehack.net>
MAINDOMAIN="REPLACE.ME.WITH.YOUR.DOMAIN.com"
set -e
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
@niun
niun / find-raspberry.sh
Last active September 16, 2022 12:06
Find Raspberry Pi in network (looking for MAC address vendor prefix of Raspberry Pi Foundation using nmap, awk for ipv4 / ping6, ip, grep for ipv6 neighbour discovery)
sudo nmap -sP 192.168.0.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'