Commit 6b6d3b66 authored by Wilton Norris's avatar Wilton Norris
Browse files

fix format

parent cf1f6934
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -9,15 +9,22 @@ beautifulsoup4==4.5.3
## Configuration items

**captive_portal_server:** see [here](https://www.noisyfox.cn/45.html). Default is "http://captive.v2ex.co/generate_204"

**username**: Your SUSTC studnet ID

**password**: CAS login password

**interval_retry_connection**: In second. If the status check failed (e.g. the server was down or there is no Internet connection), how long the program will wait before next attempt. Default value is 30.

**interval_check_status**:  In second. Determine how long the program will wait before next status check. Default value is 60.

**interval_retry_login**:  In second. If the login failed (e.g. wrong username & password combination, login params were changed, or the CAS server was down), how long the program will wait before next attempt. Default value is 30.

**max_times_retry_login**: Maximum time the program will try to login to the server. Default value is 5.

## Settings for OpenWrt routers
If you use a router which has OpenWrt, then it's strongly recommended that you use the following script to reconnect to wan interface when the connection was down.

For the server will drop connections at a random period, then login script won't work if the interface is not reconnected.
use the following script:

@@ -34,9 +41,11 @@ use the following script:
	exit 0

Save it to /etc/config/reconnect_wan.sh, then

>chmod 0775 /etc/config/reconnect_wan.sh

and add this to crontab in your luci configuration page, or use crontab -e

>\* * * * * /etc/config/reconnect_wan.sh

this script will run every 1 minute