aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/netmonitor_up
blob: a0cba3fa70244c2db16efefb5909bf3cd4162781 (plain)
1
2
3
4
5
6
7
8
9
10
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