Skip to content

Instantly share code, notes, and snippets.

@CRCinAU
CRCinAU / run-automatic-update.sh
Last active March 26, 2026 12:21
Alpine Linux automatic updates - place in /etc/periodic/daily/
#!/bin/bash
set -o pipefail
# Alpine Linux Automatic Update Script
# ====================================
# Configuration
LOG_FILE="/var/log/alpine-auto-update.log" # Path to the update log file
LOCK_FILE="/var/run/alpine-auto-update.lock" # Lock file to prevent concurrent runs
BACKUP_DIR="/var/backups/pre-update" # Directory for pre-update backups