summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-12-10 01:41:05 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-12-10 01:41:05 (GMT)
commitf77e676cfc7f6919fa6a4145180899afd4ad1fd6 (patch)
tree9f2b653bfbb4edbf57bcda815676956a6fa05c12 /abs/core-testing/LinHES-config
parent8203006cf9ee68a8e33e30d48ea6b396d1a7b7e4 (diff)
downloadlinhes_pkgbuild-f77e676cfc7f6919fa6a4145180899afd4ad1fd6.zip
linhes_pkgbuild-f77e676cfc7f6919fa6a4145180899afd4ad1fd6.tar.gz
linhes_pkgbuild-f77e676cfc7f6919fa6a4145180899afd4ad1fd6.tar.bz2
Connect various pieces to dd password protection to /mythweb.
Disabled by default.
Diffstat (limited to 'abs/core-testing/LinHES-config')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rw-r--r--abs/core-testing/LinHES-config/myth_user_call14
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.sh18
3 files changed, 28 insertions, 6 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index f9d2aae..d35dfbb 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=1.0
-pkgrel=85
+pkgrel=89
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan )
diff --git a/abs/core-testing/LinHES-config/myth_user_call b/abs/core-testing/LinHES-config/myth_user_call
index d95e468..0f899df 100644
--- a/abs/core-testing/LinHES-config/myth_user_call
+++ b/abs/core-testing/LinHES-config/myth_user_call
@@ -1,4 +1,4 @@
-#!/bin/bash
+GGGGGGGGG#!/bin/bash
#Wrapper script to manage USERNAME accounts + web security
# myth_USERNAME_all -c add -u USERNAME
# myth_USERNAME_all -c delete -u USERNAME
@@ -63,7 +63,14 @@ function pass_change() {
function web_security {
- echo "this is just a stub"
+
+ grep -q ${USERNAME}: /etc/lighttpd/lighttpd.user
+ if [ $? = 0 ]
+ then
+ #delete user
+ sed -i "/${USERNAME}\:/d" /etc/lighttpd/lighttpd.user
+ fi
+ echo "${USERNAME}:${PASSWORD}" >> /etc/lighttpd/lighttpd.user
}
@@ -155,7 +162,8 @@ case $OPERATION in
then
print_help
fi
- echo "adding webUSERNAME $USERNAME with $PASS"
+ echo "adding webUSERNAME $USERNAME with pass $PASSWORD"
+ web_security
;;
*) print_help
;;
diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh
index 05dfd89..f2f20a0 100755
--- a/abs/core-testing/LinHES-config/systemconfig.sh
+++ b/abs/core-testing/LinHES-config/systemconfig.sh
@@ -217,7 +217,7 @@ function setupremote {
if [ ! -d /home/mythtv/.mythtv ]
then
mkdir /home/mythtv/.mythtv
- chown mythtv:mythtv /home/mythtv/.mythtv
+ chown mythtv:mythtv /home/mythtv/.mythtv
fi
ln -s /etc/lircrc /home/mythtv/.mythtv/lircrc 2> /dev/null
@@ -227,7 +227,7 @@ function setupremote {
ln -s /etc/lircrc /home/mythtv/.lircrc 2> /dev/null
fi
-
+
;;
esac
@@ -988,6 +988,18 @@ do
done
}
+function setup_web_auth {
+ if [ x$UseMythWEB_auth = x1 ]
+ then
+ #enable auth
+ sed -ie "s/^.*include.*auth-inc.conf.*$/include \"\/etc\/lighttpd\/auth-inc.conf\"/g" /etc/lighttpd/lighttpd.conf
+ else
+ #disable auth
+ sed -ie "s/^.*include.*auth-inc.conf.*$/#include \"\/etc\/lighttpd\/auth-inc.conf\"/g" /etc/lighttpd/lighttpd.conf
+ fi
+ sudo sv restart lighttpd
+
+}
#----------------------------------------------------MAIN PROGRAM-------------------------------------------
#misc,sleep,hostype,advanced,audio
@@ -1019,6 +1031,8 @@ for i in $LIST
;;
advancedX) showX="true"
;;
+ webuser) setup_web_auth
+ ;;
restartfe) killall -9 mythfrontend
killall -9 mythwelcome
exit 0