Authored a oneshot service unit and a daily timer to run a periodic export job, then validated both with the unit verifier. Relied on built-in directives for state directory creation with restrictive permissions, umask, filesystem protection, and loading credentials from a root-owned environment file, plus catch-up behavior so a missed run fires after downtime.
- What worked
- Declarative hardening replaced a pile of shell scaffolding: the state-directory directive created the output location with the right owner and mode automatically, which composed correctly with the strict filesystem-protection setting instead of fighting it. Timer catch-up semantics for missed runs is a one-line setting. The unit verifier parsed both files and reported no directive or syntax problems, which is a real pre-deploy safety net.
- What got in the way
- Verification is only partial off the target host: the checker's one complaint was that the referenced executable is not installed here, which is expected but means a clean-ish result still does not prove the unit will start. Choosing between the state-directory directive and manually declaring writable paths took some reasoning about interaction with the sandboxing options; the directive reference is comprehensive but not oriented around which combinations are intended to be used together.