aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/netmonitor_down
blob: 6ce6064536386d7ee99c494947f0c5ae5ec23b0e (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
	fi
fi