2
# postrm script for #PACKAGE#
4
# see: dh_installdeb(1)
8
# summary of how this script can be called:
11
# * <old-postrm> `upgrade' <new-version>
12
# * <new-postrm> `failed-upgrade' <old-version>
13
# * <new-postrm> `abort-install'
14
# * <new-postrm> `abort-install' <old-version>
15
# * <new-postrm> `abort-upgrade' <old-version>
16
# * <disappearer's-postrm> `disappear' <overwriter>
17
# <overwriter-version>
18
# for details, see http://www.debian.org/doc/debian-policy/ or
19
# the debian-policy package
22
echo -n "* BoxeeLive: Restoring mt-daapd configuration... "
23
md51="`md5sum /usr/share/boxeelive/mt-daapd.conf | cut -d \" \" -f1`"
24
md52="`md5sum /etc/mt-daapd.conf | cut -d \" \" -f1`"
25
if [ "$md51" = "$md52" ]; then
26
# config not touched by user; we can safely restore the older.
28
mv /etc/mt-daapd.conf.boxeelivebackup /etc/mt-daapd.conf
29
[ "$?" != "0" ] && echo "Failed."
31
# config changed by someone. Leave it untouched.
32
echo "Modified by user; leaved untouched."
36
invoke-rc.d mt-daapd restart || echo "Failed to restart mt-daapd server. Changes will take effect on the next boot."
40
echo -n "* BoxeeLive: Restoring modprobe.d alsa-base configuration... "
41
md51="`md5sum /usr/share/boxeelive/alsa-base.conf | cut -d \" \" -f1`"
42
md52="`md5sum /etc/modprobe.d/alsa-base.conf | cut -d \" \" -f1`"
43
if [ "$md51" = "$md52" ]; then
44
# config not touched by user; we can safely restore the older.
45
rm /etc/modprobe.d/alsa-base.conf
46
mv /etc/modprobe.d/alsa-base.conf.boxeelivebackup /etc/modprobe.d/alsa-base.conf
47
[ "$?" != "0" ] && echo "Failed."
49
# config changed by someone. Leave it untouched.
50
echo "Modified by user; leaved untouched."
57
echo -n "* BoxeeLive: Restoring rc.local... "
58
md51="`md5sum /usr/share/boxeelive/rc.local | cut -d \" \" -f1`"
59
md52="`md5sum /etc/rc.local | cut -d \" \" -f1`"
60
if [ "$md51" = "$md52" ]; then
61
# config not touched by user; we can safely restore the older.
63
mv /etc/rc.local.boxeelivebackup /etc/rc.local
64
[ "$?" != "0" ] && echo "Failed."
66
# config changed by someone. Leave it untouched.
67
echo "Modified by user; leaved untouched."
74
echo -n "* BoxeeLive: Restoring bluetooth configuration... "
75
md51="`md5sum /usr/share/boxeelive/input.conf | cut -d \" \" -f1`"
76
md52="`md5sum /etc/bluetooth/input.conf | cut -d \" \" -f1`"
77
if [ "$md51" = "$md52" ]; then
78
# config not touched by user; we can safely restore the older.
79
rm /etc/bluetooth/input.conf
80
mv /etc/bluetooth/input.conf.boxeelivebackup /etc/bluetooth/input.conf
81
[ "$?" != "0" ] && echo "Failed."
83
# config changed by someone. Leave it untouched.
84
echo "Modified by user; leaved untouched."
91
echo -n "* BoxeeLive: Restoring transmission-daemon configuration... "
92
md51="`md5sum /usr/share/boxeelive/settings.json | cut -d \" \" -f1`"
93
md52="`md5sum /etc/transmission-daemon/settings.json | cut -d \" \" -f1`"
94
if [ "$md51" = "$md52" ]; then
95
# config not touched by user; we can safely restore the older.
96
rm /etc/transmission-daemon/settings.json
97
mv /etc/transmission-daemon/settings.json.boxeelivebackup /etc/transmission-daemon/settings.json
98
[ "$?" != "0" ] && echo "Failed."
100
# config changed by someone. Leave it untouched.
101
echo "Modified by user; leaved untouched."
108
echo -n "* BoxeeLive: Restoring sabnzdbplus configuration... "
109
md51="`md5sum /usr/share/boxeelive/sabnzdbplus | cut -d \" \" -f1`"
110
md52="`md5sum /etc/default/sabnzbdplus | cut -d \" \" -f1`"
111
if [ "$md51" = "$md52" ]; then
112
# config not touched by user; we can safely restore the older.
113
rm /etc/default/sabnzbdplus
114
mv /etc/default/sabnzbdplus.boxeelivebackup /etc/default/sabnzbdplus
115
[ "$?" != "0" ] && echo "Failed."
117
# config changed by someone. Leave it untouched.
118
echo "Modified by user; leaved untouched."
125
purge|remove|failed-upgrade|abort-install|abort-upgrade|disappear)
135
echo "* Package upgrade; skipping prerm.";;
138
echo "postrm called with unknown argument \`$1'" >&2
143
# dh_installdeb will replace this with shell code automatically
144
# generated by other debhelper scripts.