mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-06 03:26:50 +03:00
Procd support
This commit is contained in:
30
README.md
30
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
|
||||
|
||||

|
||||
@@ -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
|
||||
|
||||

|
||||
|
||||
@@ -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 <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||
|
||||
|
||||
@@ -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 <https://github.com/gSpotx2f/luci-app-internet-detector>
|
||||
|
||||
|
||||
@@ -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 <https://github.com/gSpotx2f/luci-app-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"
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user