mirror of
https://github.com/sixfab/Sixfab_PPP_Installer
synced 2024-11-22 02:54:53 +00:00
Added config file for general variables
This commit is contained in:
parent
15537b5feb
commit
c2b5866071
@ -1,5 +1,6 @@
|
||||
#!/binenv bash
|
||||
#!/bin/env bash
|
||||
|
||||
INTERVAL=60
|
||||
DOUBLE_CHECK_WAIT=10
|
||||
PING_TIMEOUT=9
|
||||
INTERVAL=60 # Seconds, Interval between two connection check of internet
|
||||
DOUBLE_CHECK_WAIT=10 # Seconds, wait time for double check when the connection is down
|
||||
PING_TIMEOUT=9 # Seconds, Timeout of ping command
|
||||
NETWORK_CHECK_TIMEOUT=300 # Count, Check network for ($NETWORK_TIMEOUT x 2 Seconds)
|
@ -1,5 +1,7 @@
|
||||
#!/bin/env bash
|
||||
|
||||
source configs.sh
|
||||
|
||||
function debug()
|
||||
{
|
||||
echo $(date "+%Y/%m/%d - %H:%M:%S :") "$1"
|
||||
@ -7,12 +9,10 @@ function debug()
|
||||
|
||||
function check_network()
|
||||
{
|
||||
NETWORK_TIMEOUT=300 # Check network for ($NETWORK_TIMEOUT x 2 Seconds)
|
||||
|
||||
# Check the network is ready
|
||||
debug "Checking the network is ready..."
|
||||
|
||||
for i in {1..$NETWORK_TIMEOUT}; do
|
||||
for i in {1..$NETWORK_CHECK_TIMEOUT}; do
|
||||
NETWORK_OK=0
|
||||
|
||||
debug "SIM Status:"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/env bash
|
||||
|
||||
source functions.sh
|
||||
source config.sh
|
||||
source configs.sh
|
||||
|
||||
echo "PING TIMEOUT: " $PING_TIMEOUT
|
||||
echo "DOUBLE CHECK WAIT: " $DOUBLE_CHECK_WAIT
|
||||
|
Loading…
Reference in New Issue
Block a user