2
# postinst script for #PACKAGE#
4
# see: dh_installdeb(1)
8
# summary of how this script can be called:
9
# * <postinst> `configure' <most-recently-configured-version>
10
# * <old-postinst> `abort-upgrade' <new version>
11
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
13
# * <postinst> `abort-remove'
14
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15
# <failed-install-package> <version> `removing'
16
# <conflicting-package> <version>
17
# for details, see http://www.debian.org/doc/debian-policy/ or
18
# the debian-policy package
21
echo -n "* BoxeeLive: Install mt-daapd configuration... "
22
# Backup the old config
23
mv /etc/mt-daapd.conf /etc/mt-daapd.conf.boxeelivebackup
25
cp /usr/share/boxeelive/mt-daapd.conf /etc/mt-daapd.conf
26
if [ "$?" != "0" ]; then
28
echo "W: Failed to change mt-daapd Configuration."
33
invoke-rc.d mt-daapd restart || echo "Failed to restart mt-daapd server. Changes will take effect on the next boot."
37
# WARNING: Not the best thing to do, the replace of a modprobe.d file...
38
echo -n "* BoxeeLive: Install modprobe.d alsa-base configuration... "
39
# Backup the old config
40
mv /etc/modprobe.d/alsa-base.conf /etc/modprobe.d/alsa-base.conf.boxeelivebackup
42
cp /usr/share/boxeelive/alsa-base.conf /etc/modprobe.d/alsa-base.conf
43
if [ "$?" != "0" ]; then
45
echo "W: Failed to change modprobe.d Configuration. WARNING: THE SYSTEM IS POTENTIALLY HARMED!"
53
# WARNING: Not the best thing to do, but needed.
54
echo -n "* BoxeeLive: Changing rc.local..."
55
# Backup the old config
56
mv /etc/rc.local /etc/rc.local.boxeelivebackup
58
cp /usr/share/boxeelive/rc.local /etc/rc.local
59
if [ "$?" != "0" ]; then
61
echo "W: Failed to change rc.local."
69
echo -n "* BoxeeLive: Install bluetooth configuration... "
70
# Backup the old config
71
mv /etc/bluetooth/input.conf /etc/bluetooth/input.conf.boxeelivebackup
73
cp /usr/share/boxeelive/input.conf /etc/bluetooth/input.conf
74
if [ "$?" != "0" ]; then
76
echo "W: Failed to change input.conf Configuration."
81
invoke-rc.d bluetooth restart || echo "Failed to restart bluetooth daemon. Changes will take effect on the next boot."
85
echo -n "* BoxeeLive: Install transmission configuration... "
86
# Backup the old config
87
mv /etc/transmission-daemon/settings.json /etc/transmission-daemon/settings.json.boxeelivebackup
89
cp /usr/share/boxeelive/settings.json /etc/transmission-daemon/settings.json
90
if [ "$?" != "0" ]; then
92
echo "W: Failed to change settings.json Configuration."
97
invoke-rc.d transmission-daemon reload || echo "Failed to reload transmission daemon. Changes will take effect on the next boot."
101
echo -n "* BoxeeLive: Install sabnzdbplus configuration... "
102
# Backup the old config
103
mv /etc/default/sabnzbdplus /etc/default/sabnzbdplus.boxeelivebackup
105
cp /usr/share/boxeelive/sabnzbdplus /etc/default/sabnzbdplus
106
if [ "$?" != "0" ]; then
108
echo "W: Failed to change sabnzdbplus Configuration."
113
invoke-rc.d transmission-daemon restart || echo "Failed to restart sabnzdbplus daemon. Changes will take effect on the next boot."
126
abort-upgrade|abort-remove|abort-deconfigure)
130
echo "postinst called with unknown argument \`$1'" >&2
135
# dh_installdeb will replace this with shell code automatically
136
# generated by other debhelper scripts.