[1.3] Telegram Push notifications
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: Telegram Push notifications
How interesting. Are you using some kind of dongle for networking or something?
What does this output: sudo nems-info nic
What does this output: sudo nems-info nic
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
RE: Telegram Push notifications
No, NEMS is connected directly to a switch by cable...Robbie Ferguson wrote: How interesting. Are you using some kind of dongle for networking or something?
What does this output: sudo nems-info nic
Code: Select all
$ sudo nems-info nic
eth0 proto ra
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: Telegram Push notifications
Thanks.
What is the full output of this command? ip route get "172.217.10.142"
What is the full output of this command? ip route get "172.217.10.142"
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
RE: Telegram Push notifications
Robbie Ferguson wrote: Thanks.
What is the full output of this command? ip route get "172.217.10.142"
Code: Select all
ip route get "172.217.10.142"
172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28
cache
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: Telegram Push notifications
Try as I might, I am yet unable to replicate the problem you're experiencing.
What is the output of this command?
Thanks!
What is the output of this command?
Code: Select all
cat /usr/local/bin/nems-info | grep proto
Thanks!
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
RE: Telegram Push notifications
Code: Select all
$ cat /usr/local/bin/nems-info | grep proto
interface=`ip route get "$host_ip" | grep -Po '(?<=(dev )).*(?= src| proto)'`
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: Telegram Push notifications
Thanks. So you have the latest software, and all should work correctly. It makes no sense that your nems-info nic is outputting "eth0 proto ra" since your nems-info script contains grep -Po '(?<=(dev )).*(?= src| proto)'`... the return from that would be eth0 in your case as per (dev )).*(?= src| proto). Even manually echoing your result I still get eth0.
echo "172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28" | grep -Po '(?<=(dev )).*(?= src| proto)'
You are experiencing the issue on NEMS 1.4.1 on a Pi?
echo "172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28" | grep -Po '(?<=(dev )).*(?= src| proto)'
You are experiencing the issue on NEMS 1.4.1 on a Pi?
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
RE: Telegram Push notifications
Yes, this is 1.4.1 on a Pi.
However, I had a closer look at the output of the nems-info script.
returns:
so, this is an IPV6 address...
returns:
The grep that this is piped to probably gets confused...
EDIT: I experimented somewhat with the grep command and this does the trick:
However, I had a closer look at the output of the nems-info script.
Code: Select all
host_ip=$(getent ahosts "$host" | awk '{print $1; exit}')
Code: Select all
2a00:1450:400e:806::200e
Code: Select all
interface=`ip route get "$host_ip"`
Code: Select all
2a00:1450:400e:806::200e from :: via fe80::de53:7cff:feec:d56b dev eth0 proto ra src 2a02:1812:1709:ac00:ba27:ebff:fe42:c170 metric 1024 hoplimit 64 pref high
EDIT: I experimented somewhat with the grep command and this does the trick:
Code: Select all
| grep -Po '(?<=dev )[^ ]+'
Code: Select all
echo "2a00:1450:400e:806::200e from :: via fe80::de53:7cff:feec:d56b dev eth0 proto ra src 2a02:1812:1709:ac00:ba27:ebff:fe42:c170 metric 1024 hoplimit 64 pref high" | grep -Po '(?<=dev )[^ ]+'
eth0
Last edited by baggins on Mon Dec 17, 2018 6:38 am, edited 1 time in total.
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: Telegram Push notifications
Oh okay - the result you had posted was IPv4. I'll do some testing with the IPv6 result - thanks.
grep -Po '(?<=(dev )).*(?= src| proto)' -- this selects the text between "dev " and either " src" or " proto". By deleting the second part, you'd break the result on most board, resulting in a result like you are reporting.
This is why I'm confused by your result of 172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28.
As you can see, eth0 is between "dev " and " src" - so the result would be eth0.
I think you tested and gave me answers from the wrong system :)
I'll fix it based on the new info. I see the problem based on your IPv6 result.
Robbie
grep -Po '(?<=(dev )).*(?= src| proto)' -- this selects the text between "dev " and either " src" or " proto". By deleting the second part, you'd break the result on most board, resulting in a result like you are reporting.
This is why I'm confused by your result of 172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28.
As you can see, eth0 is between "dev " and " src" - so the result would be eth0.
I think you tested and gave me answers from the wrong system :)
I'll fix it based on the new info. I see the problem based on your IPv6 result.
Robbie
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: Telegram Push notifications
Please run sudo nems-update
Should be fixed now.
Thanks baggins!
Should be fixed now.
Thanks baggins!
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems