mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-08-01 00:25:04 +02:00
Initial Commit.
This commit is contained in:
parent
8cacc24150
commit
ff04ad34f2
4 changed files with 110 additions and 0 deletions
23
RouterOS_PPP_Disconnect_Active_Sessions.rsc
Normal file
23
RouterOS_PPP_Disconnect_Active_Sessions.rsc
Normal file
|
@ -0,0 +1,23 @@
|
|||
# RouterOS Function
|
||||
# Copyright (c) Grzegorz Budny
|
||||
# Version 1.0
|
||||
# Last update: 3/15/2020
|
||||
# Disconnects all active PPP sessions at once
|
||||
|
||||
:global DisconnectActivePPPSesssions do={
|
||||
|
||||
:local pppSessions [/ppp active print count-only];
|
||||
|
||||
:for i from=0 to=$pppSessions step=1 do= \
|
||||
{
|
||||
|
||||
/ppp active remove numbers=$i;
|
||||
:log info ("...:::Removing PPP Sesion no ".$i.":::...";
|
||||
|
||||
}
|
||||
|
||||
:log info ("...:::Removed PPP sessions: ".$pppSessions);
|
||||
|
||||
}
|
||||
|
||||
$DisconnectActivePPPSesssions;
|
Loading…
Add table
Add a link
Reference in a new issue