Skip to content

Instantly share code, notes, and snippets.

View atetzner's full-sized avatar

Andreas atetzner

View GitHub Profile
@atetzner
atetzner / check-certificate-expiration.sh
Created October 7, 2022 08:36
Script to check if the HTTP certificate for an arbitrary domain expires within the next days
#!/bin/bash
TARGET=${TARGET:-$1}
if [ "$TARGET" = "" ] ; then
echo "Usage: $0 TARGET_HOST"
exit 1
fi
DAYS=${DAYS:-7}
@atetzner
atetzner / Pipewire-Systemd-Service.md
Last active June 1, 2026 08:08
Start Pipewire on a headless machine as systemd system service on boot (including support for Bluetooth speakers / headphones)

Pipewire Systemd service

The following Ansible tasks will perform all necessary steps to start Pipewire as a Systemd system service that runs directly on startup and is available for all non-user services like MPD or Airsonic. The steps are adapted from this Gitlab issue and have originally been created for a RaspberryPi 5 headless machine with Raspberry Pi OS (64 bit Debian bookworm).

Note that Pipewire Pulse is also installed and gets configured to be available on network. This allows e.g. remote configuration, volume changes, etc.

audio-settings script and pipewire-settings.service

@atetzner
atetzner / cd-dvd-disk-rescue.sh
Created January 23, 2026 19:18
Script for automatic ripping of older/broken CDs and DVDs to disk with data rescue
#!/bin/bash
# This script is intended to rescue data from older CDs and DVDs, which are only partially readable.
# It uses ddrescue to store an image of such disks to your machine and after that tries to extract
# data from the images:
# - Data disks are just copied using rsync
# - VCDs/SVCDs and Video DVDs are ripped. All DVD titles with >3min are extracted to get the main
# title and bonus material
# - Audio disks are ripped to OGG using abcde
#