Created
September 28, 2021 18:24
-
-
Save Klice/7f55bf81f4332fee1a344f658df9d6fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~# cat /etc/udev/rules.d/90-rtl.rules | |
ACTION=="add", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", TAG+="systemd", RUN+="/bin/systemctl --no-block restart rtl_tcp.service" | |
~# cat /etc/systemd/system/rtl_tcp.service | |
[Unit] | |
Description=RTL TCP service | |
After=network.target | |
StartLimitIntervalSec=0 | |
[Service] | |
Type=simple | |
Restart=always | |
RestartSec=1 | |
User=root | |
ExecStart=/usr/bin/rtl_tcp -a 0.0.0.0 & | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=rtl_tcp | |
KillSignal=SIGKILL | |
[Install] | |
WantedBy=multi-user.target | |
~# udevadm control --reload-rules | |
~# systemctl daemon-reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment