#!/usr/bin/env bash # Fake systemd-run: records the timer command without running it. set -euo pipefail printf 'systemd-run %s\n' "$*" >>"$STUB_LOG" [[ "${STUB_SYSTEMD_RUN_RC:-0}" == 0 ]] || exit "$STUB_SYSTEMD_RUN_RC" # systemd-run options come before the scheduled command. while (( $# > 0 )) && [[ "$1" == --* ]]; do [[ "$1" == --setenv=* ]] && printf '%s\n' "${1#--setenv=}" >"$STUB_STATE/timer_env" shift done printf '%s\n' "$@" >"$STUB_STATE/timer_cmd"