1 | #!/bin/sh |
---|
2 | INSTDIR="$1" |
---|
3 | |
---|
4 | sed s#_path_#"$INSTDIR"#g -i "$INSTDIR/etc/oscam_ymod.emu" |
---|
5 | |
---|
6 | if [ "/mnt/swapextensions" == "$INSTDIR" ]; then |
---|
7 | sed s#_type_#"MNT"#g -i "$INSTDIR/etc/oscam_ymod.emu" |
---|
8 | elif [ "/var/swap" == "$INSTDIR" ]; then |
---|
9 | sed s#_type_#"SWAP"#g -i "$INSTDIR/etc/oscam_ymod.emu" |
---|
10 | else |
---|
11 | sed s#_type_#"VAR"#g -i "$INSTDIR/etc/oscam_ymod.emu" |
---|
12 | fi |
---|
13 | |
---|
14 | if [ ! -e "$INSTDIR/keys/oscam.conf" ]; then |
---|
15 | echo "use ipk 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" |
---|
18 | else |
---|
19 | echo "found user config file: oscam.conf" |
---|
20 | echo "skip ipk config file: oscam.conf.oscam" |
---|
21 | fi |
---|
22 | |
---|
23 | if [ ! -e "$INSTDIR/keys/oscam.provid" ]; then |
---|
24 | echo "use ipk 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" |
---|
27 | else |
---|
28 | echo "found user config file: oscam.provid" |
---|
29 | echo "skip ipk config file: oscam.provid.oscam" |
---|
30 | fi |
---|
31 | |
---|
32 | if [ ! -e "$INSTDIR/keys/oscam.srvid" ]; then |
---|
33 | echo "use ipk 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" |
---|
36 | else |
---|
37 | echo "found user config file: oscam.srvid" |
---|
38 | echo "skip ipk config file: oscam.srvid.oscam" |
---|
39 | fi |
---|
40 | |
---|
41 | if [ ! -e "$INSTDIR/keys/oscam.server" ]; then |
---|
42 | echo "use ipk 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" |
---|
45 | else |
---|
46 | echo "found user config file: oscam.server" |
---|
47 | echo "skip ipk config file: oscam.server.oscam" |
---|
48 | fi |
---|
49 | |
---|
50 | if [ ! -e "$INSTDIR/keys/oscam.user" ]; then |
---|
51 | echo "use ipk 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" |
---|
54 | else |
---|
55 | echo "found user config file: oscam.user" |
---|
56 | echo "skip ipk config file: oscam.user.oscam" |
---|
57 | fi |
---|
58 | |
---|
59 | if [ ! -e "$INSTDIR/keys/oscam.services" ]; then |
---|
60 | echo "use ipk 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" |
---|
63 | else |
---|
64 | echo "found user config file: oscam.services" |
---|
65 | echo "skip ipk config file: oscam.services.oscam" |
---|
66 | fi |
---|
67 | |
---|
68 | if [ ! -e "$INSTDIR/keys/oscam.dvbapi" ]; then |
---|
69 | echo "use ipk 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" |
---|
72 | else |
---|
73 | echo "found user config file: oscam.dvbapi" |
---|
74 | echo "skip ipk config file: oscam.dvbapi.oscam" |
---|
75 | fi |
---|
76 | |
---|
77 | if [ ! -e "$INSTDIR/keys/oscam.stat" ]; then |
---|
78 | echo "use ipk config file: oscam.stat" |
---|
79 | echo "rename $INSTDIR/keys/oscam.stat.oscam > $INSTDIR/keys/oscam.stat" |
---|
80 | mv "$INSTDIR/keys/oscam.stat.oscam" "$INSTDIR/keys/oscam.stat" |
---|
81 | else |
---|
82 | echo "found user config file: oscam.stat" |
---|
83 | echo "skip ipk config file: oscam.stat.oscam" |
---|
84 | fi |
---|
85 | |
---|
86 | exit 0 |
---|