#!/usr/bin/env bash # Install the systemd timer that publishes a new CRX when master moves. # Run as root on the droplet: ./deploy/install-autopublish.sh set -euo pipefail cd "$(dirname "$0")/.." [ "$(id -u)" -eq 0 ] || { echo "run as root" >&2; exit 1; } install -m 644 deploy/autofirmer-publish.service /etc/systemd/system/ install -m 644 deploy/autofirmer-publish.timer /etc/systemd/system/ systemctl daemon-reload systemctl enable --now autofirmer-publish.timer echo echo " installed. next run:" systemctl list-timers autofirmer-publish.timer --no-pager | sed -n '2p' echo echo " logs: tail -f /opt/autofirmer/deploy/publish.log" echo " heartbeat: cat /opt/autofirmer/deploy/.last-check" echo " disable: systemctl disable --now autofirmer-publish.timer"