Hi,
I need seroius programmer that expert in shell programming code.
i have hacked xiaofang camera to use by telegram and send my notification if someone coming (motion), and also want to reboot script.
for test that you expert in this case, i need you to let me know how you fix this code:
myIP() {
INTFC=eth0
MYIPV4=$(ip -4 -o addr show eth0 | awk '{print $4}' | cut -d "/" -f 1)
$TELEGRAM m $MYIPV4
}
this code is wrong, cannot showing local ip address. and i want you to tell me what you will do to fix this code?
i want pay per hour until this script done
I can help you out with the script. I am a senior Linux administrator with over 20 years of experience.
As for your question about what is wrong:
- you set the interface name in variable, but you are later not using this variable, but using hardcoded eth0 instead
- $TELEGRAM variable might by uninitialized
- you are missing "function" before myIP()
Hi,
There are multiple reasons for it to not work. Have you verified the interface name?
I have 7+ years of work experience and can help you fix it. Please initiate the chat to discuss further.
Regards,
Sanchit
Hi, I'm a DevOps Engineer/System Administrator, based on your project details you need someone who knows bash script. I think I am best fit for it, since it's my everyday job, And part of my job is included with scripting. Feel free to drop me a message. So that I can tell you what was the problem is and I can help you solve or rewrite your script.
Hi
if you want to get ipv4 address on the eth0 interface on variable like for example $MYIPV4 i can help you to get Exact ipv4 from the interface with in minutes. feel free to discuss it further