Skip to content

Instantly share code, notes, and snippets.

View usrflo's full-sized avatar

Florian Sager usrflo

View GitHub Profile
@usrflo
usrflo / certbot-cleanup.sh
Last active April 24, 2024 13:37
Remove outdated letsencrypt CSRs, keys and certificates from /etc/letsencrypt
#!/bin/bash
# Remove outdated letsencrypt CSRs, keys and certificates
lesslBasePath=/etc/letsencrypt
keepOldVersions=1
keepOldCsrDays=180
keepOldKeysDays=180
if [ ! -d "$lesslBasePath" ]; then
@usrflo
usrflo / lxc-sync-README
Last active April 23, 2023 21:04
lxc copy --refresh workaround: efficient incremental ZFS snapshot sync with send/receive
# This cronjob is configured on the target server:
# - srclxdremotename: name of the lxd remote that contains the container to be synced
# - srclxdcontainername: name of the remote lxd container to be synced
# - locallxdcontainertargetname: local target container name to sync to
# - root@srcserver: ssh root login to the remote lxd server
# lxc-sync jobs
25 12,18 * * * /opt/lxc-sync/lxc-sync.sh -o srclxdremotename -r srclxdcontainername -l locallxdcontainertargetname -c "ssh -p2222 -oStrictHostKeyChecking=no root@srcserver"
@usrflo
usrflo / check_nvme
Created May 25, 2020 20:39 — forked from deric/check_nvme
nagios/icinga check script for NVMe disk
#!/bin/bash
set -o errexit -o nounset -o pipefail
export LC_ALL=C
# Checks for NVMe disks. nmve-cli must be installed.
#
# Author: Tomas Barton
# Requirements:
# nvme-cli - git clone https://github.com/linux-nvme/nvme-cli
#
# Usage: