#!/bin/sh

timer="$1"
shift

# Simple wrapper script that stores the exit code of a command into a file
"$@"
exitcode=$?

echo "$exitcode" > "/var/lib/systemd-timer-monitored/$timer"