mirror of
https://github.com/QSCTech/zjunet.git
synced 2026-01-22 19:54:48 +08:00
vpn disconnect
This commit is contained in:
parent
b5db28c519
commit
a4a330ba59
13
vpn.sh
13
vpn.sh
@ -21,10 +21,6 @@
|
|||||||
# along with this program. If not, see
|
# along with this program. If not, see
|
||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
disconnect() {
|
|
||||||
echo 'disconnect'
|
|
||||||
}
|
|
||||||
|
|
||||||
set_up_routes() {
|
set_up_routes() {
|
||||||
|
|
||||||
IP=$(ip route show 0/0 | cut -d " " -f 3)
|
IP=$(ip route show 0/0 | cut -d " " -f 3)
|
||||||
@ -66,6 +62,15 @@ connect() {
|
|||||||
set_up_routes
|
set_up_routes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disconnect() {
|
||||||
|
users=$("${BASEDIR}/user.sh" getall)
|
||||||
|
for username in $users; do
|
||||||
|
echo "Logout: ${username}"
|
||||||
|
"${BASEDIR}/xl2tpd.sh" disconnect $username
|
||||||
|
done
|
||||||
|
set_up_routes
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
#
|
#
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user