aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/netmonitor_up
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/netmonitor_up')
-rwxr-xr-xscripts/netmonitor_up11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/netmonitor_up b/scripts/netmonitor_up
new file mode 100755
index 0000000..a0cba3f
--- /dev/null
+++ b/scripts/netmonitor_up
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# simple log the time when connection was started
+#
+
+if [ -r /etc/sysconfig/network-scripts/ifcfg-$1 ]; then
+ . /etc/sysconfig/network-scripts/ifcfg-$1
+ if [ "a$ACCOUNTING" = "ayes" ]; then
+ echo $1:UP:$(date +%s) >> /var/log/net_monitor
+ fi
+fi