Skip to content

Commit d050a0e

Browse files
committed
improve luci install
1 parent 76d8ec3 commit d050a0e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

decompressed/gui_file/usr/share/transformer/scripts/appInstallRemoveUtility.sh

+5-8
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,14 @@ app_luci() {
181181
luci_install_arm() {
182182
opkg update
183183
[ ! -f /rom/usr/lib/libjson-c.so.2 ] && ln -s /usr/lib/libjson-c.so.4 /usr/lib/libjson-c.so.2 #workaround for 18.x feeds used on 19.x firmware
184-
mv /usr/lib/lua/uci.so /usr/lib/lua/uci.so_bak
185-
if [ -f /etc/config/uhttpd ]; then
186-
rm /etc/config/uhttpd
187-
fi
184+
rm -rf /etc/config/uhttpd
188185
opkg install --force-reinstall libuci-lua luci rpcd
186+
[ ! -f /etc/init.d/uhttpd ] && opkg install uhttpd # only on 19.x is not getting installed as dependency?
189187
mkdir /www_luci
190188
mv /www/cgi-bin /www_luci/
191189
mv /www/luci-static /www_luci/
192190
mv /www/index.html /www_luci/
193-
rm /usr/lib/lua/uci.so
194-
mv /usr/lib/lua/uci.so_bak /usr/lib/lua/uci.so
191+
cp /rom/usr/lib/lua/uci.so /usr/lib/lua/ #restore lib as it gets removed by libuci-lua
195192
sed -i 's/require "uci"/require "uci_luci"/g' /usr/lib/lua/luci/model/uci.lua #modify luci to load his original lib with different name
196193

197194
if [ ! "$(uci get uhttpd.main.listen_http | grep 9080)" ]; then
@@ -246,8 +243,8 @@ app_luci() {
246243
[ ! -f /rom/usr/lib/libjson-c.so.2 ] && rm /usr/lib/libjson-c.so.2 #workaround for 18.x feeds used on 19.x firmware
247244
cp /rom/usr/lib/lua/uci.so /usr/lib/lua/ #restore lib as it gets removed by libuci-lua
248245

249-
rm -r /www_luci
250-
rm /etc/config/uhttpd
246+
rm -rf /www_luci
247+
rm -rf /etc/config/uhttpd
251248
}
252249

253250
luci_remove_mips() {

0 commit comments

Comments
 (0)