From a1a0c1d1f5bd8a0cb99cefe44c204b59a2bfb867 Mon Sep 17 00:00:00 2001 From: Albert Hopkins Date: Sat, 9 Apr 2011 23:45:35 -0400 Subject: [PATCH] teamplayer: various updates. keeping up with the times... --- teamplayer/Makefile | 6 ++++++ teamplayer/lighttpd.conf | 2 +- teamplayer/local.start | 4 ---- teamplayer/package.use | 1 + teamplayer/start-teamplayer | 7 ++++--- teamplayer/stop-teamplayer | 3 ++- teamplayer/world | 1 - 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/teamplayer/Makefile b/teamplayer/Makefile index 11b7e05..fde0b4e 100644 --- a/teamplayer/Makefile +++ b/teamplayer/Makefile @@ -15,11 +15,14 @@ post_files = bash_profile settings_local.py start-teamplayer stop-teamplayer post_files += local.start local.stop issue lighttpd.conf teamplayer.service preinstall: + $(inroot) $(EMERGE) --select -n $(USEPKG) dev-lang/python:2.7 + $(inroot) eselect python set python2.7 postinstall: $(post_files) $(inroot) $(EMERGE) -n $(USEPKG) =dev-db/postgresql-server-$(PGVER)* $(inroot) passwd -d postgres echo 'PG_INITDB_OPTS="--locale=en_US.UTF-8"' >> $(CHROOT)/etc/conf.d/postgresql-$(PGVER) + $(inroot) eselect postgresql set $(PGVER) yes | $(inroot) $(EMERGE) --config =postgresql-server-$(PGVER)* $(inroot) rc-update add postgresql-$(PGVER) default ifeq ($(AVAHI),YES) @@ -54,5 +57,8 @@ endif $(inroot) rc-update add lighttpd default $(inroot) rc-update add ntpd default + # Fix for Gentoo bug #359361. Remove when fixed + $(inroot) ln -s /usr/lib/postgresql-$(PGVER)/lib64/libpq.so.5 /usr/lib/libpq.so.5 + clean: diff --git a/teamplayer/lighttpd.conf b/teamplayer/lighttpd.conf index 7219a5e..d0cd2fa 100644 --- a/teamplayer/lighttpd.conf +++ b/teamplayer/lighttpd.conf @@ -61,7 +61,7 @@ url.access-deny = ("~", ".inc") # begin TeamPlayer config -server.max-request-size = 21000 +server.max-request-size = 100000 fastcgi.server = ( "/teamplayer.fcgi" => ( "main" => ( diff --git a/teamplayer/local.start b/teamplayer/local.start index a933a31..b97c145 100755 --- a/teamplayer/local.start +++ b/teamplayer/local.start @@ -11,8 +11,4 @@ fi su -c "TP_HOME/bin/start-teamplayer" TP_USER tailf /var/log/teamplayer/teamplayer.log > /dev/tty7 & -# put some ionice on mpd -sleep 3 -ionice -c2 -n0 -p$(cat TP_DB/mpd/mpd.pid) - touch /etc/firstboot diff --git a/teamplayer/package.use b/teamplayer/package.use index 64a7d04..e65591d 100644 --- a/teamplayer/package.use +++ b/teamplayer/package.use @@ -6,4 +6,5 @@ media-libs/flac ogg media-sound/mpd audiofile ffmpeg flac id3 lame network ogg vorbis mad sqlite media-video/ffmpeg mmx mxext mp3 network x264 sys-kernel/gentoo-sources symlink +virtual/ffmpeg x264 mp3 www-servers/lighttpd fastcgi pcre diff --git a/teamplayer/start-teamplayer b/teamplayer/start-teamplayer index f4dc34d..f6e1eb0 100755 --- a/teamplayer/start-teamplayer +++ b/teamplayer/start-teamplayer @@ -2,6 +2,7 @@ # this should be run as the TP_USER user PYTHONPATH="/etc/teamplayer:$PYTHONPATH" +PYTHON=python2.7 export PYTHONPATH cd ~ @@ -10,14 +11,14 @@ hg serve -p 8000 --prefix /repo/ > /var/log/teamplayer/hgserve.log 2>&1 & cd ~/web if [ ! -f "/etc/firstboot" ] ; then - python manage.py syncdb --noinput --verbosity=0 + $PYTHON manage.py syncdb --noinput --verbosity=0 fi # start the fastcgi daemon -python manage.py runfcgi daemonize=true protocol=fcgi maxrequest=20 \ +$PYTHON manage.py runfcgi daemonize=true protocol=fcgi maxrequest=20 \ pidfile="TP_DB/fcgi.pid" socket=TP_DB/teamplayer.sock umask=002 \ > "/var/log/teamplayer/teamplayer.log" 2>&1 # spin! -python manage.py spin --verbosity=2 $@ > "/var/log/teamplayer/teamplayer.log" 2>&1 & +$PYTHON manage.py spin --verbosity=2 $@ > "/var/log/teamplayer/teamplayer.log" 2>&1 & echo $! > "TP_DB/tps.pid" diff --git a/teamplayer/stop-teamplayer b/teamplayer/stop-teamplayer index f4ab755..4199ca4 100755 --- a/teamplayer/stop-teamplayer +++ b/teamplayer/stop-teamplayer @@ -3,9 +3,10 @@ cd ~/web PYTHONPATH="/etc/teamplayer:$PYTHONPATH" +PYTHON=python2.7 export PYTHONPATH [ -f "TP_DB/tps.pid" ] && kill $(cat "TP_DB/tps.pid") [ -f "TP_DB/fcgi.pid" ] && kill $(cat "TP_DB/fcgi.pid") -python manage.py stop_stream >> "/var/log/teamplayer/teamplayer.log" +$PYTHON manage.py stop_stream >> "/var/log/teamplayer/teamplayer.log" diff --git a/teamplayer/world b/teamplayer/world index 180347a..8654651 100644 --- a/teamplayer/world +++ b/teamplayer/world @@ -1,7 +1,6 @@ dev-python/django dev-python/flup dev-python/python-mpd -dev-vcs/mercurial media-libs/mutagen media-sound/mpd net-misc/dhcpcd