diff options
author | Greg Frost <gregfrost1@bigpond.com> | 2009-10-19 12:41:34 (GMT) |
---|---|---|
committer | Greg Frost <gregfrost1@bigpond.com> | 2009-10-19 12:41:34 (GMT) |
commit | 601cb5987fe81d489ba4c1bafd96be123f3e7053 (patch) | |
tree | 1270812576f2a2ef319dfe20743f0919759be81a /abs/core-testing/LinHES-config | |
parent | e7669898217ae0c57b2798568964e1bb0a71813c (diff) | |
download | linhes_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/LinHES-config')
-rw-r--r-- | abs/core-testing/LinHES-config/PKGBUILD | 3 | ||||
-rwxr-xr-x | abs/core-testing/LinHES-config/mv_ddns.py | 25 | ||||
-rwxr-xr-x | abs/core-testing/LinHES-config/systemconfig.py | 3 |
3 files changed, 29 insertions, 2 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 |