virtual-appliance/teamplayer/local.start
Albert Hopkins 71c7629cb3 * Make non-public services only listen on localhost
* /opt/teamplayer/* is owned by root and thus not writeable

* Put config files in /etc/teamplayer

* Switch DBMS from Sqlite to PostgreSQL
2010-08-15 18:04:54 -04:00

19 lines
481 B
Bash
Executable File

#!/bin/sh
if [ ! -f /etc/firstboot ] ; then
echo "Creating TeamPlayer database ..."
createuser -U postgres -D -S -R teamplayer
createdb -U postgres teamplayer
touch /var/log/teamplayer/teamplayer.log
chown TP_USER:TP_USER /var/log/teamplayer/teamplayer.log
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