no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | linux:networking:auto_openconnect [2019/11/20 08:41] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Always on openconnect ====== | ||
| + | <WRAP center round alert 60%> | ||
| + | Saving passwords in plain text is bad! | ||
| + | </ | ||
| + | <code bash Cron> | ||
| + | * * * * * /root/oc.sh | ||
| + | </ | ||
| + | |||
| + | <code bash oc.sh> | ||
| + | #!/bin/bash | ||
| + | target=$1 | ||
| + | count=$( ping -c 1 10.1.2.3 | grep icmp* | wc -l ) | ||
| + | |||
| + | if [ $count -eq 0 ] | ||
| + | then | ||
| + | echo "VPN is down." | ||
| + | echo " | ||
| + | else | ||
| + | echo "VPN is UP" | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | <code bash html> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | .button { | ||
| + | display: inline-block; | ||
| + | text-align: center; | ||
| + | vertical-align: | ||
| + | padding: 12px 24px; | ||
| + | border: 1px solid #a12727; | ||
| + | border-radius: | ||
| + | background: #ff4a4a; | ||
| + | background: -webkit-gradient(linear, | ||
| + | background: -moz-linear-gradient(top, | ||
| + | background: linear-gradient(to bottom, #ff4a4a, #992727); | ||
| + | -webkit-box-shadow: | ||
| + | -moz-box-shadow: | ||
| + | box-shadow: #ff5959 0px 0px 40px 0px; | ||
| + | text-shadow: | ||
| + | font: normal normal bold 20px arial; | ||
| + | color: #ffffff; | ||
| + | text-decoration: | ||
| + | } | ||
| + | .button: | ||
| + | .button: | ||
| + | background: #ff5959; | ||
| + | background: -webkit-gradient(linear, | ||
| + | background: -moz-linear-gradient(top, | ||
| + | background: linear-gradient(to bottom, #ff5959, #b62f2f); | ||
| + | color: #ffffff; | ||
| + | text-decoration: | ||
| + | } | ||
| + | .button: | ||
| + | background: #982727; | ||
| + | background: -webkit-gradient(linear, | ||
| + | background: -moz-linear-gradient(top, | ||
| + | background: linear-gradient(to bottom, #982727, #982727); | ||
| + | } | ||
| + | |||
| + | |||
| + | .button1 { | ||
| + | display: inline-block; | ||
| + | text-align: center; | ||
| + | vertical-align: | ||
| + | padding: 12px 24px; | ||
| + | border: 1px solid #258f25; | ||
| + | border-radius: | ||
| + | background: #3ce93c; | ||
| + | background: -webkit-gradient(linear, | ||
| + | background: -moz-linear-gradient(top, | ||
| + | background: linear-gradient(to bottom, #3ce93c, #258f25); | ||
| + | -webkit-box-shadow: | ||
| + | -moz-box-shadow: | ||
| + | box-shadow: #37d737 0px 0px 40px 0px; | ||
| + | text-shadow: | ||
| + | font: normal normal bold 20px arial; | ||
| + | color: #ffffff; | ||
| + | text-decoration: | ||
| + | } | ||
| + | .button1: | ||
| + | .button1: | ||
| + | border: 1px solid #2eb32e; | ||
| + | background: #48ff48; | ||
| + | background: -webkit-gradient(linear, | ||
| + | background: -moz-linear-gradient(top, | ||
| + | background: linear-gradient(to bottom, #48ff48, #2cac2c); | ||
| + | color: #ffffff; | ||
| + | text-decoration: | ||
| + | } | ||
| + | .button1: | ||
| + | background: #258f25; | ||
| + | background: -webkit-gradient(linear, | ||
| + | background: -moz-linear-gradient(top, | ||
| + | background: linear-gradient(to bottom, #258f25, #258f25); | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <?php | ||
| + | $a = exec(' | ||
| + | if (strlen($a)==0) { | ||
| + | ?> | ||
| + | <a class=" | ||
| + | <?php } else { ?> | ||
| + | <a class=" | ||
| + | <?php } ?> | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||