teamplayer: various updates. keeping up with the times...

This commit is contained in:
Albert Hopkins 2011-04-09 23:45:35 -04:00
parent 0c8126df93
commit a1a0c1d1f5
7 changed files with 14 additions and 10 deletions

View File

@ -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:

View File

@ -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" => (

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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