s6-rc: propagate service status out of run script

This commit is contained in:
Colin 2024-05-07 12:50:09 +00:00
parent c12691a3a0
commit fdf1b20368

View File

@ -124,8 +124,10 @@ let
# N.B. do not run the notifier from $HOME, else it won't know where to find the `data/check` program.
# N.B. must be run with `&` + `wait`, else we lose the ability to `trap`.
${maybe-notify}env --chdir="$HOME" ${cli} <&0 &
wait
log "exiting"
wait $!
status=$?
log "exiting; propagating status: $status"
exit "$status"
'';
in {
"${name}".dir = {