diff options
author | James Meyer <james.meyer@operamail.com> | 2012-12-22 15:59:21 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-12-22 15:59:21 (GMT) |
commit | ed28d2bff19273fac6cf03486c10919a68653e65 (patch) | |
tree | fc61b47ee7bc12d921bc2c04169cdf97310bfc5d /abs/core/LinHES-config/mv_software.py | |
parent | 482fe93065abe75624b3c213a4c2bf6ecb778c2c (diff) | |
download | linhes_pkgbuild-ed28d2bff19273fac6cf03486c10919a68653e65.zip linhes_pkgbuild-ed28d2bff19273fac6cf03486c10919a68653e65.tar.gz linhes_pkgbuild-ed28d2bff19273fac6cf03486c10919a68653e65.tar.bz2 |
LinHES-config: added support for configuing mythzmserver to myth_settings_wrapper.sh. It will add the server and port to the settings table for each system that has mythzoneminder installed. Also modificed mv_software.py to setup zoneminder where needed and also mythzmserver
refs #887
Diffstat (limited to 'abs/core/LinHES-config/mv_software.py')
-rwxr-xr-x | abs/core/LinHES-config/mv_software.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/core/LinHES-config/mv_software.py b/abs/core/LinHES-config/mv_software.py index 20b355e..41ca7c7 100755 --- a/abs/core/LinHES-config/mv_software.py +++ b/abs/core/LinHES-config/mv_software.py @@ -1,6 +1,28 @@ # -*- coding: utf-8 -*- import logging, mv_common import os, re +def zoneminder_setup(systemconfig): + logging.info("____Start of mythzoneminder config____") + mv_root = systemconfig.get("MVROOT") + if ( systemconfig.get("SystemType") == "Standalone" or + systemconfig.get("SystemType") == "Master_backend" ): + logging.info(" Adding mythzmserver" ) + #add zoneminder + mv_common.pacinstall("zoneminder") + mv_common.add_service("zoneminder") + mv_common.add_service("mythzmserver") + + #now to add the settings. + cmd = '''%s/bin/myth_settings_wrapper.sh -c ZMCONFIG -h %s -a %s'''%( + mv_root, + systemconfig.get("hostname"), + systemconfig.get("dbhost")) + mv_common.runcmd(cmd) + logging.info("____End of mythzoneminder config____") + + + + def setup_software(systemconfig, data_config): if mv_common.read_config(mv_common.module_config,"software") == False : @@ -24,6 +46,7 @@ def setup_software(systemconfig, data_config): default_installed=("mythgallery", "mythmusic") other_pkg=("miro", "mednafen", "romdb", "xine", "dvdcss", "webmin" , "fuppes", "foldingathome", "mythappletrailers", "mythstream", "mupen64") else: + #this is linhes section default_disabled = ("mytharchive", "mythbrowser", "mythnews", @@ -55,8 +78,14 @@ def setup_software(systemconfig, data_config): try: if systemconfig[pkg] == "1": mv_common.pacinstall(pkgname) + if pkgname == "mythzoneminder": + zoneminder_setup(systemconfig) else: mv_common.pacremove(pkgname) + if pkgname == "mythzoneminder": + #should be a conditional check on system type + #but not worth the effort. + mv_common.remove_service("mythzmserver") except: logging.debug(" ERROR-- %s is not defined", pkg) |