ddclient/ddclient.NetworkManager
Robert Scheck 86eb520d1b - Upgrade to 3.8.0 and several spec file cleanups (#551906)
- Rewrote initscript to match LSB standards and headers (#246903)
- Added dispatcher to NetworkManager to avoid failures (#506286)
2010-05-01 23:15:58 +00:00

15 lines
360 B
Bash

#!/bin/sh
export LC_ALL=C
if [ "$2" = "down" ]; then
/sbin/ip route ls | grep -q '^default' || {
[ -f /var/lock/subsys/ddclient ] && /sbin/service ddclient stop || :
} && { :; }
fi
if [ "$2" = "up" ]; then
/sbin/ip -o route show dev "$1" | grep -q '^default' && {
/sbin/chkconfig ddclient && /sbin/service ddclient start || :
} || { :; }
fi