-
Notifications
You must be signed in to change notification settings - Fork 1
/
pmPreRemove.script
31 lines (29 loc) · 1.18 KB
/
pmPreRemove.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
ID=com.wordpress.touchcontrol.touchvol
APP_PATH=/media/cryptofs/apps/usr/palm/applications/$ID
#remount root using technique that won't cause the random remounting error
if [ -z "$IPKG_OFFLINE_ROOT" ]; then
/usr/sbin/rootfs_open -w
fi
#remove dbus service file
/bin/rm -f /var/palm/ls2/services/prv/$ID*
/bin/rm -f /var/palm/ls2/services/pub/$ID*
#stop upstart script
/sbin/stop $ID
#remove upstart script
/bin/rm -f /var/palm/event.d/$ID
#stop any app instances
# installnoverify doesn't seem to like using luna-send
#remove luna patch - should be safe to run remove even if not installed
/bin/sh $APP_PATH/scripts/rem-lunapatch.sh
#remove state file since it wasn't put there by installer
/bin/rm -f $APP_PATH/scripts/amixer-restore.state
#remove launchpoints as they won't be good once app is removed
if [ "$(ls -A /var/luna/launchpoints/)" ]; then
rm -f `grep -l '\"id\": \"com.wordpress.touchcontrol.touchvol\"' /var/luna/launchpoints/*`
fi
# restore default alsa ucm
/bin/cp -f /usr/share/alsa/ucm/msm-audio/msm_media_case.touchvol-backup /usr/share/alsa/ucm/msm-audio/msm_media_case
# delete backup ucm
/bin/rm -f /usr/share/alsa/ucm/msm-audio/msm_media_case.touchvol-backup
exit 0