#!/usr/bin/env bash set -Eeuo pipefail readonly APP_DIR="${DASHBOARD_APP_DIR:-/opt/manus-deploy/apps/manus-dashboard}" readonly SCRIPT_DIR="/opt/manus-deploy/scripts" readonly OUTBOX_DIR="/opt/manus-deploy/secrets/ci-alerts/outbox" install -d -m 0700 "${OUTBOX_DIR}" install -m 0700 "${APP_DIR}/ops/ci-alert-email-dispatch.py" "${SCRIPT_DIR}/ci-alert-email-dispatch.py" install -m 0644 "${APP_DIR}/ops/ci-alert-email-dispatch.service" /etc/systemd/system/ci-alert-email-dispatch.service install -m 0644 "${APP_DIR}/ops/ci-alert-email-dispatch.path" /etc/systemd/system/ci-alert-email-dispatch.path systemctl daemon-reload systemctl enable --now ci-alert-email-dispatch.path