#!/bin/zsh # fleetd #360 — template for the script deploy/herdr.service's ExecStart wraps in a pty. # # `script -qfec /dev/null` needs a real command to run, and that command has to be a LOGIN # shell script: herdr itself needs the same secrets fleetd.service's login shell picks up (this # host: ~/.fleet/secrets.sh via ~/.zprofile), because members it spawns inherit its environment. # systemd's own Environment= lines in herdr.service are not enough for that -- they set TERM and a # bare PATH so the pty starts at all, nothing more. # # Copy this file to the path deploy/herdr.service's ExecStart names # (%h/LTMS/fleetd/fleetd-run/herdr-inner.sh by default) and `chmod +x` it. Not committed under # that path itself because the session name below is host-specific. # A 0x0 pty makes every pane spawn fail with "ghostty error -2" (see herdr-multi-instance-facts / # fleet01-headless-herdr-standup) -- give it a real size before herdr ever touches it. stty rows 50 cols 200 # -l: login shell, so herdr and everything it spawns gets the real secrets and PATH. exec zsh -lc 'exec herdr --session '