I am trying to setup a system such that a script gets executed everytime any USB storage device is mounted (in this case, automounted by systemd). Based on a few references here, here and here, systemd allows for the execution of custom scripts after a specific device is mounted, but these either:
- Need a specific device or mountpoint.
- Use udev, which triggers too early, and holds the mounting process.
- Use audits or logs, which isn't very satisfying.
Is there anyway to be less specific in systemd units, allowing for the use of
ExecStart after any succesful (auto)mount?