diff --git a/README.md b/README.md index b6c5042..bc94ca6 100644 --- a/README.md +++ b/README.md @@ -15,22 +15,22 @@ Internet-detector is an application for checking the availability of the Interne ## Installation notes (OpenWrt >= 21.02) opkg update - wget --no-check-certificate -O /tmp/internet-detector_1.3.0-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.3.0-1_all.ipk - opkg install /tmp/internet-detector_1.3.0-1_all.ipk - rm /tmp/internet-detector_1.3.0-1_all.ipk + wget --no-check-certificate -O /tmp/internet-detector_1.3.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector_1.3.1-r1_all.ipk + opkg install /tmp/internet-detector_1.3.1-r1_all.ipk + rm /tmp/internet-detector_1.3.1-r1_all.ipk /etc/init.d/internet-detector start /etc/init.d/internet-detector enable - wget --no-check-certificate -O /tmp/luci-app-internet-detector_1.3.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_1.3.0-r1_all.ipk - opkg install /tmp/luci-app-internet-detector_1.3.0-r1_all.ipk - rm /tmp/luci-app-internet-detector_1.3.0-r1_all.ipk + wget --no-check-certificate -O /tmp/luci-app-internet-detector_1.3.1-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-app-internet-detector_1.3.1-1_all.ipk + opkg install /tmp/luci-app-internet-detector_1.3.1-1_all.ipk + rm /tmp/luci-app-internet-detector_1.3.1-1_all.ipk /etc/init.d/rpcd restart i18n-ru: - wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_1.3.0-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_1.3.0-r1_all.ipk - opkg install /tmp/luci-i18n-internet-detector-ru_1.3.0-r1_all.ipk - rm /tmp/luci-i18n-internet-detector-ru_1.3.0-r1_all.ipk + wget --no-check-certificate -O /tmp/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk + opkg install /tmp/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk + rm /tmp/luci-i18n-internet-detector-ru_1.3.1-1_all.ipk ## Screenshots: @@ -42,9 +42,9 @@ i18n-ru: **Dependences:** modemmanager. - wget --no-check-certificate -O /tmp/internet-detector-mod-modem-restart_1.3.0-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-modem-restart_1.3.0-1_all.ipk - opkg install /tmp/internet-detector-mod-modem-restart_1.3.0-1_all.ipk - rm /tmp/internet-detector-mod-modem-restart_1.3.0-1_all.ipk + wget --no-check-certificate -O /tmp/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk + opkg install /tmp/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk + rm /tmp/internet-detector-mod-modem-restart_1.3.1-r1_all.ipk /etc/init.d/internet-detector restart ![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/04.jpg) @@ -53,9 +53,9 @@ i18n-ru: **Dependences:** mailsend. - wget --no-check-certificate -O /tmp/internet-detector-mod-email_1.3.0-1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-email_1.3.0-1_all.ipk - opkg install /tmp/internet-detector-mod-email_1.3.0-1_all.ipk - rm /tmp/internet-detector-mod-email_1.3.0-1_all.ipk + wget --no-check-certificate -O /tmp/internet-detector-mod-email_1.3.1-r1_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/current/internet-detector-mod-email_1.3.1-r1_all.ipk + opkg install /tmp/internet-detector-mod-email_1.3.1-r1_all.ipk + rm /tmp/internet-detector-mod-email_1.3.1-r1_all.ipk /etc/init.d/internet-detector restart ![](https://github.com/gSpotx2f/luci-app-internet-detector/blob/master/screenshots/05.jpg) diff --git a/internet-detector-mod-email/Makefile b/internet-detector-mod-email/Makefile index ddcbf10..f0d683a 100644 --- a/internet-detector-mod-email/Makefile +++ b/internet-detector-mod-email/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector-mod-email -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.3.1 PKG_RELEASE:=1 PKG_MAINTAINER:=gSpot diff --git a/internet-detector-mod-modem-restart/Makefile b/internet-detector-mod-modem-restart/Makefile index 0a0a4cf..f054a15 100644 --- a/internet-detector-mod-modem-restart/Makefile +++ b/internet-detector-mod-modem-restart/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector-mod-modem-restart -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.3.1 PKG_RELEASE:=1 PKG_MAINTAINER:=gSpot diff --git a/internet-detector/Makefile b/internet-detector/Makefile index f1bf607..faf5897 100644 --- a/internet-detector/Makefile +++ b/internet-detector/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=internet-detector -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.3.1 PKG_RELEASE:=1 PKG_MAINTAINER:=gSpot diff --git a/internet-detector/files/etc/init.d/internet-detector b/internet-detector/files/etc/init.d/internet-detector index 95d5ca5..a9c062b 100755 --- a/internet-detector/files/etc/init.d/internet-detector +++ b/internet-detector/files/etc/init.d/internet-detector @@ -3,16 +3,19 @@ START=97 STOP=01 +USE_PROCD=1 PROG="/usr/bin/internet-detector" run_instance() { config_get enabled "$1" enabled "0" if [ $enabled = "1" ]; then - $PROG service "$1" + procd_open_instance "$1" + procd_set_param command "$PROG" "nodaemon" "$1" + procd_close_instance fi } -start() { +start_service() { config_load internet-detector config_get mode "config" mode "0" if [ $mode = "1" ]; then @@ -20,6 +23,15 @@ start() { fi } -stop() { +stop_service() { $PROG stop } + +reload_service() { + stop + start +} + +service_triggers() { + procd_add_reload_trigger "internet-detector" +} diff --git a/luci-app-internet-detector/Makefile b/luci-app-internet-detector/Makefile index 2c58d3e..9821bb0 100644 --- a/luci-app-internet-detector/Makefile +++ b/luci-app-internet-detector/Makefile @@ -4,7 +4,9 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.3.0-r1 +PKG_NAME:=luci-app-internet-detector +PKG_VERSION:=1.3.1 +PKG_RELEASE:=1 LUCI_TITLE:=LuCI support for internet-detector LUCI_DEPENDS:=+internet-detector LUCI_PKGARCH:=all diff --git a/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js b/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js index c0ea24c..94caf5e 100644 --- a/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js +++ b/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js @@ -1210,11 +1210,4 @@ return view.extend({ mapPromise.then(node => node.classList.add('fade-in')); return mapPromise; }, - - handleSaveApply(ev, mode) { - return this.handleSave(ev).then(() => { - ui.changes.apply(mode == '0'); - window.setTimeout(() => this.serviceRestart(), 3000); - }); - }, });