summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index cf31530..42d2b5e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -52,8 +52,11 @@ int main(int argc, char* argv[]) {
status.nprocs = get_nprocs();
// Store number of processors to make load values more useful
- status.nettx = net_x_bytes("wlan0", 't');
- status.netrx = net_x_bytes("wlan0", 'r');
+ char* netdev = "wlan0";
+ if(getenv("CMON_NETDEV") != NULL)
+ netdev = getenv("CMON_NETDEV");
+ status.nettx = net_x_bytes(netdev, 't');
+ status.netrx = net_x_bytes(netdev, 'r');
// Store uptime
status.uptime = proc_uptime();

Generated by cgit