Add Cloudflare DDNS updater scripts and systemd configurations

This commit is contained in:
Nikholas Pcenicni
2026-03-21 11:09:18 -04:00
parent 60348eef9b
commit a4d8165dc2
8 changed files with 162 additions and 0 deletions

19
dyndns/deploy.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# deploy.sh - copy systemd units and on_boot entry into place, reload systemd, enable timers
set -euo pipefail
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SYSTEMD_DIR="/etc/systemd/system"
echo "Deploying from ${REPO_DIR}"
if [[ -d "${REPO_DIR}/systemd" ]]; then
cp -f "${REPO_DIR}/systemd/"* "${SYSTEMD_DIR}/"
fi
chmod +x "${REPO_DIR}/cf-ddns.sh"
systemctl daemon-reload || true
systemctl enable --now cf-ddns.timer || true
systemctl enable --now git-sync.timer || true
echo "Deployment complete."