File: ddclient.dhclient-exit-hook

package info (click to toggle)
ddclient 3.9.1-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,712 kB
  • sloc: perl: 40,447; sh: 641; xml: 55; makefile: 8
file content (19 lines) | stat: -rwxr-xr-x 493 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# /etc/dhcp/dhclient-exit-hooks.d/ddclient - exit hook for dhclient

# Run inside subshell so we can use exit to bail.
(
  [ -x /usr/sbin/ddclient ] || exit 0
  [ -f /etc/default/ddclient ] || exit 0
  . /etc/default/ddclient
  [ "$run_dhclient" = "true" ] || exit 0

  case $reason in
    BOUND|RENEW|REBIND)
      /usr/bin/logger -t dhclient "$reason, updating IP address with ddclient"
      /usr/sbin/ddclient -daemon=0 -syslog > /dev/null 2>&1
      ;;
    *)
      ;;
  esac
)