Comment 19 for bug 1891657

Revision history for this message
Balint Reczey (rbalint) wrote :

Apport keeps reshooting apport-autoreport.service as long as there are files like /var/crash/*.crash:

# cat /lib/systemd/system/apport-autoreport.path
[Unit]
Description=Process error reports when automatic reporting is enabled (file watch)
ConditionPathExists=/var/lib/apport/autoreport

[Path]
PathExistsGlob=/var/crash/*.crash

[Install]
WantedBy=paths.target

# cat /lib/systemd/system/apport-autoreport.service
[Unit]
Description=Process error reports when automatic reporting is enabled
ConditionPathExists=/var/lib/apport/autoreport
Wants=whoopsie.service
After=whoopsie.service

[Service]
Type=oneshot
ExecStart=/usr/share/apport/whoopsie-upload-all

If the service succeeds there is no reason for systemd to not restart it.

IMO apport should check the files once after the boot finised and monitor /var/crash/ for _changes_ only while the system is running.

I still check if something could be done on systemd side.