-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostinst
executable file
·61 lines (36 loc) · 1.37 KB
/
postinst
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
SID="org.webosinternals.pulseaudio.settings.srv"
APPS="/media/cryptofs/apps"
SDIR="${APPS}/usr/palm/services/${SID}"
# Handle execution as pmPostInstall.script
if [ ! -d ${APPS} ]; then
echo "Requires webOS 1.3.5 or later"
exit 1
fi
if [ -z "${IPKG_OFFLINE_ROOT}" ]; then
IPKG_OFFLINE_ROOT=/media/cryptofs/apps
mount -o remount,rw /
fi
# Remove the upstart configuration
rm -f /var/palm/event.d/${SID}
# Remove the ls2 configuration
rm -f /var/palm/ls2/roles/prv/${SID}.json
rm -f /var/palm/ls2/roles/pub/${SID}.json
# Remove the dbus service configuration
rm -f /var/palm/ls2/services/prv/${SID}.service
rm -f /var/palm/ls2/services/pub/${SID}.service
# Install the upstart configuration
mkdir -p /var/palm/event.d
cp -f ${SDIR}/configuration/event.d/${SID} /var/palm/event.d/
# Install the ls2 roles configuration
mkdir -p /var/palm/ls2/roles/prv /var/palm/ls2/roles/pub
cp ${SDIR}/${SID}.json /var/palm/ls2/roles/prv/${SID}.json
cp ${SDIR}/${SID}.json /var/palm/ls2/roles/pub/${SID}.json
# Install the dbus service configuration
mkdir -p /var/palm/ls2/services/prv /var/palm/ls2/services/pub
cp ${SDIR}/${SID}.service /var/palm/ls2/services/prv/${SID}.service
cp ${SDIR}/${SID}.service /var/palm/ls2/services/pub/${SID}.service
# Stop the JS service if running
/usr/bin/luna-send -n 1 palm://${SID}/__quit '{}'
/usr/bin/ls-control scan-services || true
exit 0