bundlewrap/bundles/systemd-timers/files/systemd-timer-monitored

10 lines
183 B
Bash

#!/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"