Add lintian-overrides file; silence lintian message "no-upstream-changelog"
[aiccu.git] / debian / 60aiccu
blob80f20296a60f8c945c1811a0eb959973d8029e90
1 #!/bin/sh
2 # Restart aiccu if connection is down
4 CONFIG=/etc/aiccu.conf
5 BINARY=/usr/sbin/aiccu
6 P6=/bin/ping6
8 . "${PM_FUNCTIONS}"
10 [ -x $BINARY ] || exit $NA
11 [ -f $CONFIG ] || exit $NA
13 case "$1" in
14 hibernate|suspend)
15 # Do nothing
17 thaw|resume)
18 # Restart aiccu if ping6 does not exist
19 [ -x $P6 ] || invoke-rc.d aiccu restart
21 # Get aiccu ipv6_interface
22 INT=$(grep ^ipv6_interface $CONFIG | cut -d" " -f 2)
24 # Ping f.root-servers.net (Internet Systems Consortium; distributed using anycast)
25 # Restart aiccu if ping failed
26 $P6 -I $INT -c 1 f.root-servers.net >/dev/null 2>&1 || invoke-rc.d aiccu restart
28 *) exit $NA
30 esac