summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-11-03 17:59:45 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-11-03 17:59:45 (GMT)
commit4be23d4482a7aec8820be8fa373bc8de5a0272b5 (patch)
tree453c78e84078cb6cfa3da1daa4906050aedb68a2 /abs/core/LinHES-config
parent306d9e4bfa29faaa561d54df14a0533d034f9773 (diff)
downloadlinhes_pkgbuild-4be23d4482a7aec8820be8fa373bc8de5a0272b5.zip
linhes_pkgbuild-4be23d4482a7aec8820be8fa373bc8de5a0272b5.tar.gz
linhes_pkgbuild-4be23d4482a7aec8820be8fa373bc8de5a0272b5.tar.bz2
mythweb, mythexport,zoneminder, web_auth: convert packages to use gen_light_include.conf
refs #864 closes #864
Diffstat (limited to 'abs/core/LinHES-config')
-rwxr-xr-xabs/core/LinHES-config/PKGBUILD4
-rwxr-xr-xabs/core/LinHES-config/mv_webuser.py17
2 files changed, 15 insertions, 6 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index b86421e..daacaf2 100755
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.3
-pkgrel=175
+pkgrel=177
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config )
pkgdesc="Install and configure your system"
depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted'
@@ -156,7 +156,7 @@ md5sums=('6a9a22b3c3cb74d9f1ac595cf437a7b7'
'824e49d9b01fed295c704ab68908b464'
'fe5e31b833cc6707209e9d656b6eb53c'
'ecb52b9b7a9ac0c8988093c1dfdda635'
- '23d0e12b7ca1cc6ea6b993c1d7ff20b9'
+ '087a0ef743bc8af915503f8773536ce4'
'1aa69e89034def751177cbd96c64e4ef'
'b4900090d841d3e390cb840cf16afd85'
'6dd202ec664ede468e42edf600f7913d'
diff --git a/abs/core/LinHES-config/mv_webuser.py b/abs/core/LinHES-config/mv_webuser.py
index 3e383f2..e349e0b 100755
--- a/abs/core/LinHES-config/mv_webuser.py
+++ b/abs/core/LinHES-config/mv_webuser.py
@@ -8,16 +8,25 @@ def setup_web_auth(UseMythWEB_auth):
return
logging.info("____Start of setup_web_auth____")
+ include_file="/etc/gen_light_conf.d/auth.conf"
if UseMythWEB_auth == str(1):
- #enable auth
logging.info(" Enabling authorization for mythweb")
- cmd='''sed -i "s/^.*include.*auth-inc.conf.*$/include \\"\/etc\/lighttpd\/auth-inc.conf\\"/g" /etc/lighttpd/lighttpd.conf'''
- mv_common.runcmd(cmd)
+ try:
+ fo = open(include_file, "w")
+ out_string='''include "/etc/lighttpd/auth-inc.conf"'''
+ fo.write(out_string)
+ fo.close()
+ except:
+ logging.info(" Couldn't open auth include file")
+
else:
#disable auth
logging.info(" Disabling authorization for mythweb")
- cmd='''sed -i "s/^.*include.*auth-inc.conf.*$/#include \\"\/etc\/lighttpd\/auth-inc.conf\\"/g" /etc/lighttpd/lighttpd.conf'''
+ cmd="rm -f %s" %include_file
mv_common.runcmd(cmd)
+ logging.debug("Running gen_light_include.py")
+ cmd="/usr/LH/bin/gen_light_include.py"
+ mv_common.runcmd(cmd)
logging.debug("Restarting lighttpd")
cmd="sudo sv restart lighttpd"
mv_common.runcmd(cmd)