diff options
-rw-r--r-- | user/systemd-analyze-plot.service | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/user/systemd-analyze-plot.service b/user/systemd-analyze-plot.service new file mode 100644 index 0000000..de9a0e3 --- /dev/null +++ b/user/systemd-analyze-plot.service @@ -0,0 +1,15 @@ +[Unit] +Description=Saving systemd-analyze plot to pre-defined folder +After=local-fs.target + +[Service] +Type=oneshot +Environment="PLOTDIR=/tmp/" +Environment="PLOTNAME=systemd-analyze.svg" +EnvironmentFile=-%h/.config/systemd/plot.conf +ExecStartPre=/usr/bin/rm -f ${PLOTDIR}${PLOTNAME} +ExecStart=/usr/bin/bash -c '/usr/bin/systemd-analyze plot > ${PLOTDIR}${PLOTNAME}' +RemainAfterExit=true + +[Install] +WantedBy=default.target |