[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/.plot.conf 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