19 lines
481 B
Bash
Executable File
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
|