#!/usr/bin/env bash set -Eeuo pipefail readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" install -D -m 0700 "${SCRIPT_DIR}/gitea-token-rotation.sh" /opt/manus-deploy/scripts/gitea-token-rotation.sh install -D -m 0644 "${SCRIPT_DIR}/gitea-token-rotation.service" /etc/systemd/system/gitea-token-rotation.service install -D -m 0644 "${SCRIPT_DIR}/gitea-token-rotation.timer" /etc/systemd/system/gitea-token-rotation.timer install -D -m 0644 "${SCRIPT_DIR}/gitea-token-rotation-apply.service" /etc/systemd/system/gitea-token-rotation-apply.service install -D -m 0644 "${SCRIPT_DIR}/gitea-token-rotation-apply.path" /etc/systemd/system/gitea-token-rotation-apply.path install -d -m 0700 /opt/manus-deploy/secrets/gitea-token-rotation install -d -m 0750 /var/log/manus-deploy systemctl daemon-reload systemctl enable --now gitea-token-rotation.timer systemctl enable --now gitea-token-rotation-apply.path systemctl is-enabled gitea-token-rotation.timer systemctl is-enabled gitea-token-rotation-apply.path systemctl list-timers gitea-token-rotation.timer --no-pager