v0.3. Internet detector daemon

This commit is contained in:
gSpot
2021-10-31 20:07:17 +03:00
parent 511dea9ee0
commit a008297225
34 changed files with 1917 additions and 143 deletions

View File

@@ -0,0 +1,18 @@
config main 'config'
option mode '2'
option enable_logger '1'
option enable_up_script '0'
option enable_down_script '0'
option enable_run_script '0'
option interval_up '30'
option interval_down '5'
option ui_interval_up '6'
option ui_interval_down '1'
list hosts '8.8.8.8'
list hosts '1.1.1.1'
option check_type '0'
option connection_attempts '2'
option connection_timeout '2'
option ui_connection_attempts '1'
option ui_connection_timeout '1'
option tcp_port '53'

View File

@@ -0,0 +1,19 @@
#!/bin/sh /etc/rc.common
START=99
STOP=01
ID="/usr/bin/internet-detector"
start() {
$ID
}
stop() {
$ID stop
}
restart() {
stop
start
}

View File

@@ -0,0 +1 @@
# Shell commands to run when disconnected from the Internet

View File

@@ -0,0 +1,4 @@
# Shell commands that are executed every time the Internet is checked for availability
#
# $1 - (0|1) - internet status: 0 is up, 1 is down
#

View File

@@ -0,0 +1 @@
# Shell commands that run when connected to the Internet