network/ddclient: Added to 12.0 repository

This commit is contained in:
Iskar Enev 2010-05-11 20:01:30 +02:00 committed by Robby Workman
parent 0513e01a00
commit c5b8f0a5d9
6 changed files with 161 additions and 0 deletions

9
network/ddclient/README Normal file
View file

@ -0,0 +1,9 @@
DDclient is a small but full featured Perl client used to update
dynamic DNS entries for accounts on Dynamic DNS Network Services
free DNS service. It has the capability to update more than only
dyndns and it can fetch your WAN-ipaddress on a few different ways.
Supported features include: operating as a daemon, manual and
automatic updates, static and dynamic updates, optimized updates for
multiple addresses, MX, wildcards, abuse avoidance, retrying failed
updates, and sending update status to syslog and through e-mail.

View file

@ -0,0 +1,47 @@
#!/bin/sh
# Slackware build script for ddclient
# Written by Iskar Enev <iskar.enev[@]gmail.com>
PRGNAM=ddclient
VERSION=3.7.3
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
mkdir -p $PKG/usr/bin
cp -a ddclient $PKG/usr/bin
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
chmod 644 sample*
cp -a COPY* Change* README* TODO sample* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.ddclient.new > $PKG/etc/rc.d/rc.ddclient.new
mkdir -p $PKG/etc/ddclient
cat sample-etc_ddclient.conf > $PKG/etc/ddclient/ddclient.conf.new
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

View file

@ -0,0 +1,8 @@
PRGNAM="ddclient"
VERSION="3.7.3"
HOMEPAGE="http://ddclient.sourceforge.net/"
DOWNLOAD="http://downloads.sourceforge.net/ddclient/ddclient-3.7.3.tar.bz2"
MD5SUM="f6a55bc68cf73ffe7e80d2fa5cd44f85"
MAINTAINER="Iskar Enev"
EMAIL="iskar.enev[@]gmail.com"
APPROVED="rworkman"

View file

@ -0,0 +1,35 @@
#!/bin/sh
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
# Keep same perms on rc.ddclient.new:
if [ -e etc/rc.d/rc.ddclient ]; then
cp -a etc/rc.d/rc.ddclient etc/rc.d/rc.ddclient.new.incoming
cat etc/rc.d/rc.ddclient.new > etc/rc.d/rc.ddclient.new.incoming
mv etc/rc.d/rc.ddclient.new.incoming etc/rc.d/rc.ddclient.new
fi
config etc/rc.d/rc.ddclient.new
# Keep same perms on ddclient.conf.new:
# Normally, we don't bother with this for config files, but this one
# should usually be readable only by root, so that's how we'll install
# it. However, if the admin changes it, we don't want to undo that.
if [ -e etc/ddclient/ddclient.conf ]; then
cp -a etc/ddclient/ddclient.conf etc/ddclient/ddclient.conf.new.incoming
cat etc/ddclient/ddclient.conf.new > etc/ddclient/ddclient.conf.new.incoming
mv etc/ddclient/ddclient.conf.new.incoming etc/ddclient/ddclient.conf.new
else
chmod 0600 etc/ddclient/ddclient.conf.new
fi
config etc/ddclient/ddclient.conf.new

View file

@ -0,0 +1,43 @@
#!/bin/sh
#
# ddclient This shell script takes care of starting and stopping
# ddclient.
#
# ddclient provides support for updating dynamic DNS services.
[ -f /etc/ddclient/ddclient.conf ] || exit 1
case "$1" in
start)
echo -n "Starting ddclient: "
ddclient
echo
;;
stop)
echo -n "Shutting down ddclient: "
#kill $( ps -aef | grep ddclient | grep sleeping | awk '{print$2}' )
kill -9 $( cat /var/run/ddclient.pid )
echo
;;
restart)
$0 stop
$0 start
;;
status)
pids=$( ps -aef | grep ddclient | grep sleeping | awk '{print$2}' )
if test "$pids"
then
for p in $pids
do
echo "ddclient (pid $p) is running."
done
else
echo "ddclient is stopped."
fi
;;
*)
echo "Usage: ddclient {start|stop|restart|status}"
exit 1
esac
exit 0

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler----------------------------------------------------|
ddclient: DDclient (Perl based DynDNS update client)
ddclient:
ddclient: DDclient is a small but full featured Perl client used to update
ddclient: dynamic DNS entries for accounts on Dynamic DNS Network Services
ddclient: free DNS service. It has the capability to update more than only
ddclient: dyndns and it can fetch your WAN-ipaddress on a few different ways.
ddclient:
ddclient: Supported features include: operating as a daemon, manual and
ddclient: automatic updates, static and dynamic updates, optimized updates for
ddclient: multiple addresses, MX, wildcards, abuse avoidance, retrying failed
ddclient: updates, and sending update status to syslog and through e-mail.