add istore-reinstall and disable-wandrop
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=1.0.1-20221121
|
||||
PKG_VERSION:=1.0.2-20230123
|
||||
PKG_RELEASE:=
|
||||
|
||||
LUCI_TITLE:=LuCI support for SysTools
|
||||
|
||||
@@ -88,7 +88,7 @@ function main_container(data, extra)
|
||||
required = true,
|
||||
title = "可执行操作",
|
||||
type = "string",
|
||||
enum = {"turn_off_ipv6", "reset_rom_pkgs", "qb_reset_password", "disk_power_mode", "speedtest", "openssl-aes256gcm", "openssl-chacha20-poly1305"},
|
||||
enum = {"turn_off_ipv6", "reset_rom_pkgs", "qb_reset_password", "disk_power_mode", "speedtest", "openssl-aes256gcm", "openssl-chacha20-poly1305", "istore-reinstall", "disable-wandrop"},
|
||||
enumNames = {
|
||||
lng.translate("Turn off IPv6"),
|
||||
lng.translate("Reset rom pkgs"),
|
||||
|
||||
@@ -16,16 +16,16 @@ usage() {
|
||||
|
||||
case ${ACTION} in
|
||||
"turn_off_ipv6")
|
||||
/usr/share/systools/turn_off_ipv6.run
|
||||
bash "/usr/share/systools/${ACTION}.run"
|
||||
;;
|
||||
"reset_rom_pkgs")
|
||||
/usr/share/systools/reset_rom_pkgs.run
|
||||
bash "/usr/share/systools/${ACTION}.run"
|
||||
;;
|
||||
"qb_reset_password")
|
||||
/usr/share/systools/qb_reset_password.run
|
||||
bash "/usr/share/systools/${ACTION}.run"
|
||||
;;
|
||||
"disk_power_mode")
|
||||
/usr/share/systools/disk_power_mode.run
|
||||
bash "/usr/share/systools/${ACTION}.run"
|
||||
;;
|
||||
"speedtest")
|
||||
/usr/share/systools/speedtest.run ${1}
|
||||
@@ -36,6 +36,12 @@ case ${ACTION} in
|
||||
"openssl-chacha20-poly1305")
|
||||
bash "/usr/share/systools/${ACTION}.run"
|
||||
;;
|
||||
"istore-reinstall")
|
||||
bash "/usr/share/systools/${ACTION}.run"
|
||||
;;
|
||||
"disable-wandrop")
|
||||
bash "/usr/share/systools/${ACTION}.run"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
/etc/init.d/wan_drop disable
|
||||
|
||||
62
applications/luci-app-systools/root/usr/share/systools/istore-reinstall.run
Executable file
62
applications/luci-app-systools/root/usr/share/systools/istore-reinstall.run
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
|
||||
version="1.0"
|
||||
APP_URL='https://istore.linkease.com/repo/all/store'
|
||||
luci_store=luci-app-store_0.1.12-9_all.ipk
|
||||
luci_taskd=luci-lib-taskd_1.0.17_all.ipk
|
||||
xterm=luci-lib-xterm_4.18.0_all.ipk
|
||||
task=taskd_1.0.3-1_all.ipk
|
||||
|
||||
setup_color() {
|
||||
# Only use colors if connected to a terminal
|
||||
if [ -t 1 ]; then
|
||||
RED=$(printf '\033[31m')
|
||||
GREEN=$(printf '\033[32m')
|
||||
YELLOW=$(printf '\033[33m')
|
||||
BLUE=$(printf '\033[34m')
|
||||
BOLD=$(printf '\033[1m')
|
||||
RESET=$(printf '\033[m')
|
||||
else
|
||||
RED=""
|
||||
GREEN=""
|
||||
YELLOW=""
|
||||
BLUE=""
|
||||
BOLD=""
|
||||
RESET=""
|
||||
fi
|
||||
}
|
||||
setup_color
|
||||
command_exists() {
|
||||
command -v "$@" >/dev/null 2>&1
|
||||
}
|
||||
error() {
|
||||
echo ${RED}"Error: $@"${RESET} >&2
|
||||
}
|
||||
|
||||
Download_Files(){
|
||||
local URL=$1
|
||||
local FileName=$2
|
||||
if command_exists curl; then
|
||||
curl -sSLk ${URL} -o ${FileName}
|
||||
elif command_exists wget; then
|
||||
wget -c --no-check-certificate ${URL} -O ${FileName}
|
||||
fi
|
||||
}
|
||||
|
||||
clean_app(){
|
||||
rm -f /tmp/${luci_store} /tmp/${luci_taskd} /tmp/${xterm} /tmp/${task}
|
||||
}
|
||||
|
||||
command_exists opkg || {
|
||||
error "The program only supports Openwrt."
|
||||
clean_app
|
||||
exit 1
|
||||
}
|
||||
|
||||
( set -x; Download_Files ${APP_URL}/${luci_store} /tmp/${luci_store};
|
||||
Download_Files ${APP_URL}/${luci_taskd} /tmp/${luci_taskd};
|
||||
Download_Files ${APP_URL}/${task} /tmp/${task};
|
||||
Download_Files ${APP_URL}/${xterm} /tmp/${xterm}; )
|
||||
|
||||
opkg install --force-reinstall /tmp/${task} /tmp/${xterm} /tmp/${luci_taskd} /tmp/${luci_store}
|
||||
|
||||
Reference in New Issue
Block a user