source: ipk/source.sh4/emus_oscam_nightly/control/postinst @ 24636

Last change on this file since 24636 was 24636, checked in by andy-1, 7 years ago

add oscam nightly

File size: 2.6 KB
Line 
1#!/bin/sh
2INSTDIR="$1"
3
4sed s#_path_#"$INSTDIR"#g -i "$INSTDIR/etc/oscam.emu"
5
6if [ "/mnt/swapextensions" == "$INSTDIR" ]; then
7        sed s#_type_#"MNT"#g -i "$INSTDIR/etc/oscam.emu"
8elif [ "/var/swap" == "$INSTDIR" ]; then
9        sed s#_type_#"SWAP"#g -i "$INSTDIR/etc/oscam.emu"
10else
11        sed s#_type_#"VAR"#g -i "$INSTDIR/etc/oscam.emu"       
12fi
13
14if [ ! -e "$INSTDIR/keys/oscam.conf" ]; then
15        echo "use tpk config file: oscam.conf"
16        echo "rename $INSTDIR/keys/oscam.conf.oscam > $INSTDIR/keys/oscam.conf"
17        mv "$INSTDIR/keys/oscam.conf.oscam" "$INSTDIR/keys/oscam.conf"
18else
19        echo "found user config file: oscam.conf"
20        echo "skip tpk config file: oscam.conf.oscam"
21fi
22
23if [ ! -e "$INSTDIR/keys/oscam.provid" ]; then
24        echo "use tpk config file: oscam.provid"
25        echo "rename $INSTDIR/keys/oscam.provid.oscam > $INSTDIR/keys/oscam.provid"
26        mv "$INSTDIR/keys/oscam.provid.oscam" "$INSTDIR/keys/oscam.provid"
27else
28        echo "found user config file: oscam.provid"
29        echo "skip tpk config file: oscam.provid.oscam"
30fi
31
32if [ ! -e "$INSTDIR/keys/oscam.srvid" ]; then
33        echo "use tpk config file: oscam.srvid"
34        echo "rename $INSTDIR/keys/oscam.srvid.oscam > $INSTDIR/keys/oscam.srvid"
35        mv "$INSTDIR/keys/oscam.srvid.oscam" "$INSTDIR/keys/oscam.srvid"
36else
37        echo "found user config file: oscam.srvid"
38        echo "skip tpk config file: oscam.srvid.oscam"
39fi
40
41if [ ! -e "$INSTDIR/keys/oscam.server" ]; then
42        echo "use tpk config file: oscam.server"
43        echo "rename $INSTDIR/keys/oscam.server.oscam > $INSTDIR/keys/oscam.server"
44        mv "$INSTDIR/keys/oscam.server.oscam" "$INSTDIR/keys/oscam.server"
45else
46        echo "found user config file: oscam.server"
47        echo "skip tpk config file: oscam.server.oscam"
48fi
49
50if [ ! -e "$INSTDIR/keys/oscam.user" ]; then
51        echo "use tpk config file: oscam.user"
52        echo "rename $INSTDIR/keys/oscam.user.oscam > $INSTDIR/keys/oscam.user"
53        mv "$INSTDIR/keys/oscam.user.oscam" "$INSTDIR/keys/oscam.user"
54else
55        echo "found user config file: oscam.user"
56        echo "skip tpk config file: oscam.user.oscam"
57fi
58
59if [ ! -e "$INSTDIR/keys/oscam.services" ]; then
60        echo "use tpk config file: oscam.services"
61        echo "rename $INSTDIR/keys/oscam.services.oscam > $INSTDIR/keys/oscam.services"
62        mv "$INSTDIR/keys/oscam.services.oscam" "$INSTDIR/keys/oscam.services"
63else
64        echo "found user config file: oscam.services"
65        echo "skip tpk config file: oscam.services.oscam"
66fi
67
68if [ ! -e "$INSTDIR/keys/oscam.dvbapi" ]; then
69        echo "use tpk config file: oscam.dvbapi"
70        echo "rename $INSTDIR/keys/oscam.dvbapi.oscam > $INSTDIR/keys/oscam.dvbapi"
71        mv "$INSTDIR/keys/oscam.dvbapi.oscam" "$INSTDIR/keys/oscam.dvbapi"
72else
73        echo "found user config file: oscam.dvbapi"
74        echo "skip tpk config file: oscam.dvbapi.oscam"
75fi
76
77exit 0
Note: See TracBrowser for help on using the repository browser.