File: ddclient.ppp.ip-up

package info (click to toggle)
ddclient 3.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,284 kB
  • sloc: perl: 14,597; sh: 916; makefile: 146; xml: 55
file content (37 lines) | stat: -rw-r--r-- 812 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#
# ip-up script for ddclient

# # These variables are for the use of the scripts run by run-parts
# PPP_IFACE="$1"
# PPP_TTY="$2"
# PPP_SPEED="$3"
# PPP_LOCAL="$4"
# PPP_REMOTE="$5"
# PPP_IPPARAM="$6"


# only run ddclient, if it is installed ;-)
if [ ! -x /usr/bin/ddclient ]; then
  exit 0
fi

# Check, if this script is activated
if [ -f /etc/default/ddclient ]; then
  . /etc/default/ddclient
  if [ ! $run_ipup = "true" ]; then
    exit 0
  fi
  # Check, if this is the interface used for DynDNS (there could be other pppds
  eval `sed -n 's/\(if=[^ 	,]*\)/\1/p' /etc/ddclient.conf`
  if [ ! $if = $PPP_IFACE ]; then
    exit 0
  fi
else
  # No configuration defaults file, so do not run
  exit 0
fi


# Run ddclient with the IP address of the ppp device
/usr/bin/ddclient -syslog -ip $PPP_LOCAL