Deleting ~/QubesIncoming on Shutdown

I would like to run a script on shutdown that deletes the contents of /home/user/QubesIncoming, I have tried some systemd ideas as this centos - kick off a systemd service just before shutdown - Unix & Linux Stack Exchange and linux - How to run a script with systemd right before shutdown? - Unix & Linux Stack Exchange but neither have worked. Any ideas on how to do this?

1 Like

Hi @oli. Welcome! I have renamed the title to your ultimate goal. Creating a script is just a path to reach that. There may be a better way other than a script. But feel free to revert it if you disagree.

This is also a question that interests me.

1 Like