virtual-appliance/teamplayer/local.start

19 lines
481 B
Plaintext
Raw Permalink Normal View History

#!/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