summaryrefslogtreecommitdiffstats
path: root/main/ez-ipupdate
diff options
context:
space:
mode:
authorJeremy Thomerson <jeremy@thomersonfamily.com>2009-08-22 05:00:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-08-22 14:46:43 +0000
commit49afd339b03ce74e0a76ac59656083aa56ba8b55 (patch)
treebce417fdd9ecc8a4a4e0f53e0ca184746e391049 /main/ez-ipupdate
parentcfb5fcad7f74b5932afc832c787762631ad797a9 (diff)
downloadaports-49afd339b03ce74e0a76ac59656083aa56ba8b55.tar.bz2
aports-49afd339b03ce74e0a76ac59656083aa56ba8b55.tar.xz
main/ez-ipupdate: new aport
utility for updating your host name for many of the dynamic DNS services (ez-ip.net, dyndns.org, etc) http://ez-ipupdate.com/
Diffstat (limited to 'main/ez-ipupdate')
-rw-r--r--main/ez-ipupdate/APKBUILD36
-rw-r--r--main/ez-ipupdate/ez-ipupdate.confd34
-rw-r--r--main/ez-ipupdate/ez-ipupdate.initd54
-rw-r--r--main/ez-ipupdate/ez-ipupdate.post-install5
-rw-r--r--main/ez-ipupdate/ez-ipupdate.pre-install5
5 files changed, 134 insertions, 0 deletions
diff --git a/main/ez-ipupdate/APKBUILD b/main/ez-ipupdate/APKBUILD
new file mode 100644
index 000000000..fbc0219dc
--- /dev/null
+++ b/main/ez-ipupdate/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Jeremy Thomerson <jeremy@thomersonfamily.com>
+# Maintainer: Jeremy Thomerson <jeremy@thomersonfamily.com>
+pkgname=ez-ipupdate
+pkgver=3.0.10
+pkgrel=0
+pkgdesc="utility for updating your host name for many of the dynamic DNS services (ez-ip.net, dyndns.org, etc)"
+url="http://ez-ipupdate.com/"
+license="GPL"
+depends=""
+makedepends=""
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages=""
+source="http://ez-ipupdate.com/dist/$pkgname-$pkgver.tar.gz
+ ez-ipupdate.confd
+ ez-ipupdate.initd
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+ make DESTDIR="$pkgdir" install
+
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -d "$pkgdir"/var/lib/$pkgname
+ install -d "$pkgdir"/var/run/$pkgname
+}
+
+md5sums="6505c9d18ef6b5ce13fe2a668eb5724b ez-ipupdate-3.0.10.tar.gz
+e6e06780b1896f2250132cc16cd10710 ez-ipupdate.confd
+04b773d467e9793c9a4e3b0e9d6a2f7f ez-ipupdate.initd"
diff --git a/main/ez-ipupdate/ez-ipupdate.confd b/main/ez-ipupdate/ez-ipupdate.confd
new file mode 100644
index 000000000..10349cff4
--- /dev/null
+++ b/main/ez-ipupdate/ez-ipupdate.confd
@@ -0,0 +1,34 @@
+# conf.d file for ez-ipupdate
+
+# NOTE: all of the options defined in this configuration file need
+# to remain in the file (do not remove them). modify them as needed
+# or leave them at the default
+
+# the type of service that you are using
+# try one of: ezip, pgpow, dhs, dyndns,
+# dyndns-static, ods, tzo, gnudip, easydns,
+# justlinux, dyns, hn, zoneedit
+SERVICE=""
+
+# What hostname are you updating?
+HOST=your-domain.service-domain.tld
+
+# Credentials used to update the service
+USER=yourusername
+PASS=yourpassword
+
+# Which interface has the IP to be updated?
+IFACE="eth0"
+
+# If you want your domain to have a wildcard alias, set this to 1
+WILDCARD=0
+
+# If you need to override the server to send updates to, do it here.
+# You can also specify the port, in this format: server[:port]
+SERVER=
+
+# max time in between updates (seconds - must be 86400 or larger)
+MAX_INTERVAL=86400
+
+# I/O timeout (seconds.millis)
+TIMEOUT=45.0
diff --git a/main/ez-ipupdate/ez-ipupdate.initd b/main/ez-ipupdate/ez-ipupdate.initd
new file mode 100644
index 000000000..45d287412
--- /dev/null
+++ b/main/ez-ipupdate/ez-ipupdate.initd
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+
+# init.d file for ez-ipupdate
+
+NAME=ez-ipupdate
+DAEMON=/usr/bin/$NAME
+DAEMON_GROUP=ipupdate
+DAEMON_USER=ipupdate
+
+# load the config
+. /etc/conf.d/${NAME}
+
+# now convert it into command line options
+OPTS="-d -S ${SERVICE} -h ${HOST} -u \"${USER}:${PASS}\" -i ${IFACE}"
+if [ "$WILDCARD" == 1 ]; then
+ OPTS="${OPTS} -w"
+fi
+if [ "$SERVER" != "" ]; then
+ OPTS="${OPTS} -s \"${SERVER}\""
+fi
+OPTS="${OPTS} -t ${TIMEOUT} -M ${MAX_INTERVAL}"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${NAME}.pid \
+ --chuid ${DAEMON_USER}:${DAEMON_GROUP} \
+ --exec ${DAEMON} -- ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet \
+ --exec ${DAEMON} \
+ --pidfile /var/run/${NAME}.pid \
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${NAME}"
+ if ! service_started "${NAME}" ; then
+ eend 1 "${NAME} is not started"
+ return 1
+ fi
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --exec ${DAEMON} --pidfile /var/run/${NAME}.pid
+ eend $?
+}
+
diff --git a/main/ez-ipupdate/ez-ipupdate.post-install b/main/ez-ipupdate/ez-ipupdate.post-install
new file mode 100644
index 000000000..846c21102
--- /dev/null
+++ b/main/ez-ipupdate/ez-ipupdate.post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+chown ipupdate:ipupdate var/run/ez-ipupdate var/lib/ez-ipupdate
+exit 0
+
diff --git a/main/ez-ipupdate/ez-ipupdate.pre-install b/main/ez-ipupdate/ez-ipupdate.pre-install
new file mode 100644
index 000000000..a8d0c4791
--- /dev/null
+++ b/main/ez-ipupdate/ez-ipupdate.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -h /var/lib/ez-ipupdate -s /bin/false -D ipupdate 2>/dev/null
+exit 0
+