teamplayer: various updates. keeping up with the times...
This commit is contained in:
parent
0c8126df93
commit
a1a0c1d1f5
|
@ -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
|
post_files += local.start local.stop issue lighttpd.conf teamplayer.service
|
||||||
|
|
||||||
preinstall:
|
preinstall:
|
||||||
|
$(inroot) $(EMERGE) --select -n $(USEPKG) dev-lang/python:2.7
|
||||||
|
$(inroot) eselect python set python2.7
|
||||||
|
|
||||||
postinstall: $(post_files)
|
postinstall: $(post_files)
|
||||||
$(inroot) $(EMERGE) -n $(USEPKG) =dev-db/postgresql-server-$(PGVER)*
|
$(inroot) $(EMERGE) -n $(USEPKG) =dev-db/postgresql-server-$(PGVER)*
|
||||||
$(inroot) passwd -d postgres
|
$(inroot) passwd -d postgres
|
||||||
echo 'PG_INITDB_OPTS="--locale=en_US.UTF-8"' >> $(CHROOT)/etc/conf.d/postgresql-$(PGVER)
|
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)*
|
yes | $(inroot) $(EMERGE) --config =postgresql-server-$(PGVER)*
|
||||||
$(inroot) rc-update add postgresql-$(PGVER) default
|
$(inroot) rc-update add postgresql-$(PGVER) default
|
||||||
ifeq ($(AVAHI),YES)
|
ifeq ($(AVAHI),YES)
|
||||||
|
@ -54,5 +57,8 @@ endif
|
||||||
$(inroot) rc-update add lighttpd default
|
$(inroot) rc-update add lighttpd default
|
||||||
$(inroot) rc-update add ntpd 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:
|
clean:
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ url.access-deny = ("~", ".inc")
|
||||||
|
|
||||||
|
|
||||||
# begin TeamPlayer config
|
# begin TeamPlayer config
|
||||||
server.max-request-size = 21000
|
server.max-request-size = 100000
|
||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
"/teamplayer.fcgi" => (
|
"/teamplayer.fcgi" => (
|
||||||
"main" => (
|
"main" => (
|
||||||
|
|
|
@ -11,8 +11,4 @@ fi
|
||||||
su -c "TP_HOME/bin/start-teamplayer" TP_USER
|
su -c "TP_HOME/bin/start-teamplayer" TP_USER
|
||||||
tailf /var/log/teamplayer/teamplayer.log > /dev/tty7 &
|
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
|
touch /etc/firstboot
|
||||||
|
|
|
@ -6,4 +6,5 @@ media-libs/flac ogg
|
||||||
media-sound/mpd audiofile ffmpeg flac id3 lame network ogg vorbis mad sqlite
|
media-sound/mpd audiofile ffmpeg flac id3 lame network ogg vorbis mad sqlite
|
||||||
media-video/ffmpeg mmx mxext mp3 network x264
|
media-video/ffmpeg mmx mxext mp3 network x264
|
||||||
sys-kernel/gentoo-sources symlink
|
sys-kernel/gentoo-sources symlink
|
||||||
|
virtual/ffmpeg x264 mp3
|
||||||
www-servers/lighttpd fastcgi pcre
|
www-servers/lighttpd fastcgi pcre
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# this should be run as the TP_USER user
|
# this should be run as the TP_USER user
|
||||||
|
|
||||||
PYTHONPATH="/etc/teamplayer:$PYTHONPATH"
|
PYTHONPATH="/etc/teamplayer:$PYTHONPATH"
|
||||||
|
PYTHON=python2.7
|
||||||
export PYTHONPATH
|
export PYTHONPATH
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
|
@ -10,14 +11,14 @@ hg serve -p 8000 --prefix /repo/ > /var/log/teamplayer/hgserve.log 2>&1 &
|
||||||
cd ~/web
|
cd ~/web
|
||||||
|
|
||||||
if [ ! -f "/etc/firstboot" ] ; then
|
if [ ! -f "/etc/firstboot" ] ; then
|
||||||
python manage.py syncdb --noinput --verbosity=0
|
$PYTHON manage.py syncdb --noinput --verbosity=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# start the fastcgi daemon
|
# 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 \
|
pidfile="TP_DB/fcgi.pid" socket=TP_DB/teamplayer.sock umask=002 \
|
||||||
> "/var/log/teamplayer/teamplayer.log" 2>&1
|
> "/var/log/teamplayer/teamplayer.log" 2>&1
|
||||||
|
|
||||||
# spin!
|
# 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"
|
echo $! > "TP_DB/tps.pid"
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
|
|
||||||
cd ~/web
|
cd ~/web
|
||||||
PYTHONPATH="/etc/teamplayer:$PYTHONPATH"
|
PYTHONPATH="/etc/teamplayer:$PYTHONPATH"
|
||||||
|
PYTHON=python2.7
|
||||||
|
|
||||||
export PYTHONPATH
|
export PYTHONPATH
|
||||||
|
|
||||||
[ -f "TP_DB/tps.pid" ] && kill $(cat "TP_DB/tps.pid")
|
[ -f "TP_DB/tps.pid" ] && kill $(cat "TP_DB/tps.pid")
|
||||||
[ -f "TP_DB/fcgi.pid" ] && kill $(cat "TP_DB/fcgi.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"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
dev-python/django
|
dev-python/django
|
||||||
dev-python/flup
|
dev-python/flup
|
||||||
dev-python/python-mpd
|
dev-python/python-mpd
|
||||||
dev-vcs/mercurial
|
|
||||||
media-libs/mutagen
|
media-libs/mutagen
|
||||||
media-sound/mpd
|
media-sound/mpd
|
||||||
net-misc/dhcpcd
|
net-misc/dhcpcd
|
||||||
|
|
Loading…
Reference in New Issue