summaryrefslogtreecommitdiffstats
path: root/abs/extra/mythexport/mythexport.install
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verizon.net>2011-08-03 22:49:59 (GMT)
committerMichael Hanson <hansonorders@verizon.net>2011-08-03 22:49:59 (GMT)
commit7d8a4f93e15f61418ea89666b57063111700dc7e (patch)
tree55fe8306be37492af59453f3e26bc142a416ebf1 /abs/extra/mythexport/mythexport.install
parentedb5eaa42980f66e1c660d570d645d661c9072a4 (diff)
downloadlinhes_pkgbuild-7d8a4f93e15f61418ea89666b57063111700dc7e.zip
linhes_pkgbuild-7d8a4f93e15f61418ea89666b57063111700dc7e.tar.gz
linhes_pkgbuild-7d8a4f93e15f61418ea89666b57063111700dc7e.tar.bz2
mythexport: Upgrade to 2.2.3 -- needs testing
Diffstat (limited to 'abs/extra/mythexport/mythexport.install')
-rw-r--r--abs/extra/mythexport/mythexport.install65
1 files changed, 65 insertions, 0 deletions
diff --git a/abs/extra/mythexport/mythexport.install b/abs/extra/mythexport/mythexport.install
index edd60f5..a6a2085 100644
--- a/abs/extra/mythexport/mythexport.install
+++ b/abs/extra/mythexport/mythexport.install
@@ -3,8 +3,73 @@ post_install() {
mysql -u root mythconverg < /usr/share/mythtv/mythexport.sql
ln -s /usr/share/mythtv/mythexport /data/srv/httpd/htdocs/
ln -s /myth/archive /usr/share/mythtv/mythexport/video
+
+ COUNT=`grep -c "include \"/etc/mythexport/mythexport.lighttpd.include\"" /etc/lighttpd/conf.include`
+
+ if [ $COUNT == 0 ] ; then
+ echo "==> Adding mythexport.lighttpd.include to conf.include"
+ echo "include \"/etc/mythexport/mythexport.lighttpd.include\"" >> \
+ /etc/lighttpd/conf.include
+ fi
+
+ echo ""
+ echo "==> Forcing a re-read of lighttpd's configuration file."
+ echo ""
+ /sbin/sv hup /service/lighttpd
+
+ echo ""
+ echo "==> Add the mythexport service to start the mythexport daemon"
+ echo "==> $ sudo add_service.sh mythexport"
+ echo ""
+
+ echo ""
+ echo "==> For move information on setup and configuration:"
+ echo "==> http://www.linhes.org/bugs/projects/linhes/wiki/HOWTO_Setup_MythExport_for_iPod"
+ echo ""
+
+}
+
+post_upgrade() {
+
+ COUNT=`grep -c "include \"/etc/mythexport/mythexport.lighttpd.include\"" /etc/lighttpd/conf.include`
+
+ if [ $COUNT == 0 ] ; then
+ echo "==> Adding mythexport.lighttpd.include to conf.include"
+ echo "include \"/etc/mythexport/mythexport.lighttpd.include\"" >> \
+ /etc/lighttpd/conf.include
+ fi
+
+ echo ""
+ echo "==> Forcing a re-read of lighttpd's configuration file."
+ echo ""
+ /sbin/sv hup /service/lighttpd
+
}
+pre_remove() {
+
+ remove_service.sh mythexport
+
+}
+
+post_remove() {
+
+ COUNT=`grep -c "include \"/etc/mythexport/mythexport.lighttpd.include\"" /etc/lighttpd/conf.include`
+
+ if [ $COUNT -gt 0 ] ; then
+ echo "==> Removing mythexport.lighttpd.include from conf.include"
+ sed -e 's#include \"/etc/mythexport/mythexport.lighttpd.include\"##' -i \
+ /etc/lighttpd/conf.include
+ fi
+
+ echo ""
+ echo "==> Forcing re-read of lighttpd's configuration file."
+ echo ""
+ /sbin/sv hup /service/lighttpd
+}
+
+
+
op=$1
shift
$op $*