Migrating an init script to systemd, and need to archive logs only if the 
service exited normally with a return code 0. I foundĀ $SERVICE_RESULT, 
$EXIT_CODE, and $EXIT_STATUSĀ  but they are in a newer version of systemd, I am 
stuck with version 219 on CentOS 7.
I'd love to run ExecStopPost on a conditional exit status but that's just not 
available. Before I get creative with Pre, Start, and Post bash scripts, is 
there any straightforward way of handling this kind of thing with systemd ?
-Mike
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to