From 9bba98c7fd7dcefe263b12eea84c7a5789d3d1b9 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Sun, 17 Nov 2013 15:10:14 -0600
Subject: mythweb: set permissions correctly so tv_icons will be populated by
 mythbackend

---
 abs/core/mythtv/stable-0.27/mythweb/PKGBUILD        |  6 +++---
 abs/core/mythtv/stable-0.27/mythweb/mythweb.install | 14 +++++++++-----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/abs/core/mythtv/stable-0.27/mythweb/PKGBUILD b/abs/core/mythtv/stable-0.27/mythweb/PKGBUILD
index d9c36d7..75e8d47 100644
--- a/abs/core/mythtv/stable-0.27/mythweb/PKGBUILD
+++ b/abs/core/mythtv/stable-0.27/mythweb/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=mythweb
 pkgver=0.27
-pkgrel=1
+pkgrel=2
 commit_hash=`cat ../git_src/git_hash_web`
 pkgdesc="Web interface for MythTV's backend, $commit_hash"
 arch=('i686' 'x86_64')
@@ -43,10 +43,10 @@ build() {
 package() {
     DOCROOT=/data/srv/httpd/mythweb
 	mkdir -p $pkgdir/$DOCROOT/{image_cache,php_sessions,data}
-        rsync -arp --exclude .git --delete-excluded  $srcdir/mythweb/* $pkgdir/$DOCROOT
+    rsync -arp --exclude .git* --delete-excluded  $srcdir/mythweb/* $pkgdir/$DOCROOT
 	rm $pkgdir/$DOCROOT/README
 	chown -R http:http $pkgdir/$DOCROOT
-	chmod g+rw $pkgdir/$DOCROOT/{image_cache,php_sessions,data}
+	chmod -R 775 $pkgdir/$DOCROOT/{image_cache,php_sessions,data}
 
     #install conf files for lighttpd
     mkdir -p $pkgdir/etc/lighttpd
diff --git a/abs/core/mythtv/stable-0.27/mythweb/mythweb.install b/abs/core/mythtv/stable-0.27/mythweb/mythweb.install
index 0073499..b8e31a8 100644
--- a/abs/core/mythtv/stable-0.27/mythweb/mythweb.install
+++ b/abs/core/mythtv/stable-0.27/mythweb/mythweb.install
@@ -1,10 +1,16 @@
 post_install() {
+ echo "==> Setting mythweb permissions."
+ chmod -R 755 /data/srv/httpd/mythweb/
+ chown mythtv:http /data/srv/httpd/mythweb/data/tv_icons
+ chmod -R 775 /data/srv/httpd/mythweb/{image_cache,php_sessions,data}
+ echo "==> Reading lighttpd's configuration file."
  gen_light_include.py
-  /sbin/sv hup /service/lighttpd
+ echo "==> Restarting lighttpd."
+ /sbin/sv hup /service/lighttpd
 }
+
 post_upgrade() {
   post_install
-
 }
 
 post_remove() {
@@ -12,7 +18,5 @@ post_remove() {
  echo
  echo "==> Forcing a re-read of lighttpd's configuration file."
  echo ""
-  /sbin/sv hup /service/lighttpd
-#--
-
+ /sbin/sv hup /service/lighttpd
 }
-- 
cgit v0.12

