Enable (or check) if a USB-RJ45 adapters is working or not?

Thanks, I don’t understand well, now it’s

root@Homebridge:~# cat /etc/network/interfaces
# Location: /etc/network/interfaces
# Please modify network settings via: dietpi-config
# Or create your own drop-ins in: /etc/network/interfaces.d/

# Drop-in configs
source interfaces.d/*

# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.6
netmask 255.255.255.0
gateway 192.168.1.2
#dns-nameservers 192.168.1.4

# WiFi
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.2
#dns-nameservers 192.168.1.4
wireless-power off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

and it should become:

# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.6
netmask 255.255.255.0
gateway 192.168.1.2
#dns-nameservers 192.168.1.4
post-up /sbin/ip route add default via 192.168.1.1 dev eth0 metric 30
post-down /sbin/ip route del default via 192.168.1.1 dev eth0 metric 30

# WiFi
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.2
#dns-nameservers 192.168.1.4
post-up /sbin/ip route add default via 192.168.1.1 dev wlan0 metric 10
post-down /sbin/ip route del default via 192.168.1.1 dev wlan0 metric 10
wireless-power off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf