#!/usr/bin/env bash # Install systemd units for the mail stack. Run as root: sudo ./install.sh set -euo pipefail HERE="$(cd "$(dirname "$0")" && pwd)" install -m 0644 "$HERE/mail-flask.service" /etc/systemd/system/mail-flask.service install -m 0644 "$HERE/mail-dramatiq.service" /etc/systemd/system/mail-dramatiq.service # Make sure log files exist and are writable by deeily. touch /var/log/mail-flask.log /var/log/mail-dramatiq.log chown deeily:deeily /var/log/mail-flask.log /var/log/mail-dramatiq.log systemctl daemon-reload systemctl enable mail-flask.service mail-dramatiq.service systemctl restart mail-flask.service mail-dramatiq.service echo echo "Status:" systemctl --no-pager status mail-flask.service mail-dramatiq.service | head -20