virtual-appliance/teamplayer/local.start

17 lines
383 B
Bash
Executable File

#!/bin/sh
LOGFILE="/var/log/teamplayer/teamplayer.log"
if [ ! -f /etc/firstboot ] ; then
echo "Creating TeamPlayer database ..."
createuser -U postgres -D -S -R teamplayer
createdb -U postgres teamplayer
touch "$LOGFILE"
chown TP_USER:TP_USER "$LOGFILE"
fi
su -c "TP_HOME/bin/start-teamplayer" TP_USER
#tailf "$LOGFILE" > /dev/console &
touch /etc/firstboot