Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienos.com/blob/main/scripts/allen/relay/start # aienos.com Source of www.aienos.com, served from my own hardware Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienos.com / scripts / allen / relay / start` 23 lines ยท 1346 bytes Raw Blame History 1 #!/bin/sh 2 # Root-run starter for allen-relay-mailer until aien-supervise owns it (no systemd unit, by Drake's order). 3 # The mailer runs as allen-relay with no_new_privs and no capabilities. The Gandi password for 4 # aien@aienos.com goes from the TPM-bound atlas vault straight into the mailer's stdin: never on 5 # disk, in argv or in the environment. nft (table inet atlas_ingress, chain output) lets the 6 # allen-relay user reach only DNS on loopback and TCP 465. 7 set -eu 8 if pgrep -u allen-relay -f /opt/allen-relay/allen_relay_mailer.py >/dev/null; then 9 echo "allen-relay-mailer: already running" >&2 10 exit 1 11 fi 12 umask 027 13 # The vault owner's home, from the passwd database (this script runs as root). 14 VAULT_HOME=$(getent passwd drakestapleton | cut -d: -f6) 15 [ -n "$VAULT_HOME" ] || { echo "allen-relay-mailer: no home for drakestapleton" >&2; exit 1; } 16 ( 17 runuser -u drakestapleton -- env -i HOME="$VAULT_HOME" PATH=/usr/bin:/bin \ 18 "$VAULT_HOME/.local/bin/atlas-vault" get GANDI_AIEN_MAIL_PASSWORD 2>/dev/null | 19 setsid setpriv --reuid=allen-relay --regid=allen-relay --init-groups \ 20 --no-new-privs --inh-caps=-all --bounding-set=-all \ 21 env -i HOME=/var/lib/allen-relay PATH=/usr/bin:/bin LANG=C.UTF-8 \ 22 /usr/bin/python3 -I /opt/allen-relay/allen_relay_mailer.py >>/var/log/allen-relay.log 2>&1 23 ) /dev/null 2>&1 &