Files
home-server/dyndns/deploy.sh
2026-03-21 11:09:18 -04:00

19 lines
538 B
Bash

#!/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."