magnific0 / wondershaper

Command-line utility for limiting an adapter's bandwidth
GNU General Public License v2.0
1.71k stars 256 forks source link

Wondershaper does not shape my traffic after reboot if I use it as a service. #64

Open ratnador opened 3 years ago

ratnador commented 3 years ago

OS: CentOS Linux release 8.3.2011

$ uname -a Linux 4.18.0-240.1.1.el8_3.x86_64 #1 SMP Thu Nov 19 17:20:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Wondershaper does not shape my traffic after reboot if I use it as a service. However, when I execute "systemctl restart wondershaper" it works fine until the system is rebooted.

I found, that if I change the following lines in the .service file /etc/systemd/system/wondershaper.service

3 --- After = network.target 4 --- Wants = network.target

3 +++ After = network-online.target 4 +++ Wants = network-online.target

It works well after reboot too.