summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-10-19 12:41:34 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-10-19 12:41:34 (GMT)
commit601cb5987fe81d489ba4c1bafd96be123f3e7053 (patch)
tree1270812576f2a2ef319dfe20743f0919759be81a /abs/core-testing
parente7669898217ae0c57b2798568964e1bb0a71813c (diff)
downloadlinhes_pkgbuild-601cb5987fe81d489ba4c1bafd96be123f3e7053.zip
linhes_pkgbuild-601cb5987fe81d489ba4c1bafd96be123f3e7053.tar.gz
linhes_pkgbuild-601cb5987fe81d489ba4c1bafd96be123f3e7053.tar.bz2
ddclient LinHES-config runit-scripts: add dyndns support
Diffstat (limited to 'abs/core-testing')
-rw-r--r--abs/core-testing/LinHES-config/PKGBUILD3
-rwxr-xr-xabs/core-testing/LinHES-config/mv_ddns.py25
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.py3
-rwxr-xr-xabs/core-testing/runit-scripts/PKGBUILD2
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/ddclient/run8
5 files changed, 38 insertions, 3 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 1e61fdf..cb8f8f3 100644
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.1
-pkgrel=1
+pkgrel=2
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted
@@ -33,6 +33,7 @@ source=(mv_install.py
README
mv_advanced.py
mv_common.py
+ mv_ddns.py
mv_ir.py
mv_misc.py
mv_network.py
diff --git a/abs/core-testing/LinHES-config/mv_ddns.py b/abs/core-testing/LinHES-config/mv_ddns.py
new file mode 100755
index 0000000..8c05fbe
--- /dev/null
+++ b/abs/core-testing/LinHES-config/mv_ddns.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+import logging, mv_common
+import os, re
+
+config_file = "mv_config"
+
+def setup_ddns(systemconfig):
+ logging.info("____Start of setup_ddns____")
+
+ if systemconfig["DDnsEnable"] == "1":
+ logging.debug(" Enabling DDNS")
+ mv_common.cp_and_log("/etc/ddclient/ddclient.conf.dynamic.dyndns.sample",
+ "/etc/ddclient/ddclient.conf")
+ cmd = ''' sed -i -e "s/your-dynamic-dyndns-login/%s/g" /etc/ddclient/ddclient.conf''' %(systemconfig["DDnslogin"])
+ mv_common.runcmd(cmd)
+ cmd = ''' sed -i -e "s/your-dynamic-dyndns-password/%s/g" /etc/ddclient/ddclient.conf''' %(systemconfig["DDnspassword"])
+ mv_common.runcmd(cmd)
+ cmd = ''' sed -i -e "s/your-dynamic-dyndns-host/%s/g" /etc/ddclient/ddclient.conf''' %(systemconfig["DDnshostname"])
+ mv_common.runcmd(cmd)
+ mv_common.add_service("ddclient")
+ else:
+ logging.debug(" Disabling DDNS")
+ mv_common.remove_service("ddclient")
+
+ logging.info("__End of ddns\n")
diff --git a/abs/core-testing/LinHES-config/systemconfig.py b/abs/core-testing/LinHES-config/systemconfig.py
index c559e09..28e2e7a 100755
--- a/abs/core-testing/LinHES-config/systemconfig.py
+++ b/abs/core-testing/LinHES-config/systemconfig.py
@@ -147,7 +147,8 @@ def main(argv):
mv_webuser.setup_web_auth(systemconfig["UseMythWEB_auth"])
if cmdmodule["ddns"]:
- print " LOOK FOR DDNS"
+ import mv_ddns
+ mv_ddns.setup_ddns(systemconfig)
if cmdmodule["screensaver"]:
import mv_screensaver
diff --git a/abs/core-testing/runit-scripts/PKGBUILD b/abs/core-testing/runit-scripts/PKGBUILD
index 14297fd..3407502 100755
--- a/abs/core-testing/runit-scripts/PKGBUILD
+++ b/abs/core-testing/runit-scripts/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=runit-scripts
pkgver=1.8.0
-pkgrel=96
+pkgrel=97
pkgdesc="collection of startup scripts for runit"
url="http://smarden.org/runit/"
license="BSD"
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/ddclient/run b/abs/core-testing/runit-scripts/runitscripts/services/ddclient/run
new file mode 100755
index 0000000..c5488f6
--- /dev/null
+++ b/abs/core-testing/runit-scripts/runitscripts/services/ddclient/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting ddclient"
+
+
+exec /usr/sbin/ddclient -foreground &> /var/log/ddclient.log