First version for the N900 (headphoned 1.5)
[headphoned] / headphoned.launch
1 #!/bin/sh
2
3 # Obtain the D-Bus session bus address
4 . /tmp/session_bus_address.user
5
6 # Add the headphoned FIFO to MPlayer's global configuration
7 CONFIG_LINE="input:file=/etc/headphoned/mplayer-input"
8 MPLAYER_CONF="/etc/mplayer/mplayer.conf"
9 if [ -f "$MPLAYER_CONF" ]; then
10   if ! grep "$CONFIG_LINE" "$MPLAYER_CONF" >/dev/null; then
11           echo -n "Updating $MPLAYER_CONF... "
12           echo $CONFIG_LINE >>$MPLAYER_CONF
13           echo "done."
14   fi
15 fi
16 # End Add the headphoned FIFO to MPlayer's global configuration
17
18 /usr/sbin/headphoned &
19