First version for the N900 (headphoned 1.5)
[headphoned] / debian / postrm
1 #!/bin/sh
2
3 #DEBHELPER#
4
5 #stop --quiet headphoned
6
7 # FIXME: Ideally, this should make proper use of Upstart
8 killall -q -SIGHUP headphoned
9
10 CONFIG_LINE="input:file=\/etc\/headphoned\/mplayer-input"
11 MPLAYER_CONF="/etc/mplayer/mplayer.conf"
12
13 # Remove the headphoned "input" config option for MPlayer (if it exists)
14 if [ -f "$MPLAYER_CONF" ]; then
15         if grep "$CONFIG_LINE" "$MPLAYER_CONF" >/dev/null; then
16                 echo -n "Updating $MPLAYER_CONF... "
17                 sed -i -e "/$CONFIG_LINE/d" "$MPLAYER_CONF"
18                 echo "done."
19         fi
20 fi
21