Add Cloudflare DDNS updater scripts and systemd configurations
This commit is contained in:
19
dyndns/deploy.sh
Normal file
19
dyndns/deploy.sh
Normal 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."
|
||||
Reference in New Issue
Block a user