LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   configure conky to show just one active ip address (https://www.linuxquestions.org/questions/linux-server-73/configure-conky-to-show-just-one-active-ip-address-4175432887/)

cccc 10-18-2012 09:32 AM

configure conky to show just one active ip address
 
hi

I'm using this entry at /etc/conky/conky.conf:
Code:

${font sans-serif:bold:size=8}IP address: $alignr ${addr eth0}
to show IP address of nic eth0 and it works well.
I have a problem with 2 nic's.
Howto configure conky to show just one active ip address eth0 or eth1?

Hangdog42 10-21-2012 07:32 AM

Check out the if_up directive in the conky documentation. So something like:
Code:

${if_up eth0}${font sans-serif:bold:size=8}IP address: $alignr ${addr eth0}${endif}
Repeat for eth1. Of course if they are both active, both will be in your conky.


All times are GMT -5. The time now is 02:40 AM.