Random Geekage

Systemd Metered Connection

My laptop is set up to download new podcasts every 6 hours. Normally, this is a good thing, particularly when it is at home. However, my work involves night shifts. There is no usable network available so I have to tether to my phone. Now, my data allowance is variable, depending on how cheap I am feeling when the previous allowance runs out. Having my computer chew through that downloading podcasts is not desirable.

Duncan pointed out the existence of a repo that consists of a systemd service file and a shell script which are used to detect if the current network connection is metered and stop running a service.

Having just done a run of nights, my laptop never attempted to grab podcasts in the time I was at work so I consider this a success. No more panicked unplugging of the USB cable and killing the service, only to do that again 6 hours later.

© . Powered by Pelican.
Creative Commons Licence This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.