depot/third_party/nixpkgs/pkgs/os-specific/linux/atop/atop.service.patch
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

10 lines
502 B
Diff

--- a/atop.service
+++ b/atop.service
@@ -9,5 +9,6 @@
Environment=LOGPATH=/var/log/atop
-EnvironmentFile=/etc/default/atop
+EnvironmentFile=-/etc/default/atop
ExecStartPre=/bin/sh -c 'test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL"'
ExecStartPre=/bin/sh -c 'test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS"'
+ExecStartPre=/bin/sh -c 'mkdir -p "${LOGPATH}"'
ExecStart=/bin/sh -c 'exec @out@/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}'