aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/netmonitor_down
blob: 8782ef7000727727e8c4b0d7828e72160def01f2 (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:DOWN:$(date +%s) >> /var/log/net_monitor.log
	fi
fi