diff options
Diffstat (limited to 'abs/core/LinHES-config/mv_common.py')
-rwxr-xr-x | abs/core/LinHES-config/mv_common.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/abs/core/LinHES-config/mv_common.py b/abs/core/LinHES-config/mv_common.py index 0f78312..b5939f2 100755 --- a/abs/core/LinHES-config/mv_common.py +++ b/abs/core/LinHES-config/mv_common.py @@ -108,6 +108,25 @@ def link_file(srcfile,link_name): return +def mkdir_mythhome(mythhome): + if not os.path.exists(mythhome+"/.mythtv"): + logging.debug(" Creating %s/.mythtv",mythhome) + try: + os.mkdir(mythhome+"/.mythtv") + except: + logging.debug(" Couldn't create .mythtv ") + return + try: + os.chown(mythhome+"/.mythtv", mythuid, mythgid) + logging.debug("* Couldn't chown of %s", mythhome) + except: + cmd = ''' chown -R mythtv %s/.mythtv''' %mythhome + runcmd(cmd) + cmd = ''' chgrp -R mythtv %s/.mythtv''' %mythhome + runcmd(cmd) + pass + + def add_service(daemon): logging.info(" Adding service %s",daemon) |