#!/bin/sh # This is a sample global plug-in for ifcfg.def script. # It will update ooo.yi.org where ooo is the user_id. # To enable a hostname update to ooo.yi.org simply create # the file INTERFACE.yi-update with the lines: # # YI_USER="The account which depicts the hostname for update" # YI_PASSWORD="The password for the account" # # Maybe someone will build one for dhs.org, not me however. # Script donated by author of yi.org. VAR="" [ "$1 $ACTION" = "post open" ] && VAR="1" [ "$1 $ACTION" = "post update" ] && [ "$CURRENTIP" != "$IP" ] && VAR="1" if [ "$VAR" ] ; then if [ -f "$MAINPATH/$INTERFACE.yi-update" ] ; then YI_USER="$HOSTNAME" YI_IP="$IP" source "$MAINPATH/$INTERFACE.yi-update" $* if [ "$YI_PASSWORD" ] ; then YI_URL="http://www.yi.org/bin/dyndns.fcgi?ipaddr=$YI_IP" echo "Updating $YI_USER.yi.org: $YI_URL" lynx -source -auth="$YI_USER:$YI_PASSWORD" "$YI_URL" > /dev/null & fi fi fi