I have a systemd timer that runs every 10 minutes to download my email with
offlineimap. The problem is that i sometimes get a big amount of mail, or big attachments, and in the meantime i might be on the road using my phone’s metered connection.
Right now i have a custom script that queries the currently active connection using
nmcli and checks if it is a metered one. If so, it doesn’t run
offlineimap at all.
My question is, can systemd timers do the same? Something along these lines:
[Timer] OnUnitInactiveSec=10m RunOnMetered=no