Community discussions

MikroTik App
 
oxigeno20
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Tue May 23, 2006 5:29 pm
Location: Argentina

Help for creating a script to delete ophran IPV6 PPP profiles

Sat Mar 16, 2024 4:33 pm

Hi, We have ower own Provisioning system made with PHP, thats allow us to create a PPPoE User DuaL Stack. That means that it is able to create a profile, with an IPv6 Pool made for a certain interface. So, when we press the button to Apply a new Rate or Create a new User, it allways create some profiles if is necesary. This works wonderfull!.
But, with the past of the time, we was upgraded the Users new profiles with more Bandwidth, and it some profiles may be are note used anymore.

I want some help to create a script than could be able to find all profiles than aren't used in any secret.

Image

Image
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Help for creating a script to delete ophran IPV6 PPP profiles

Sat Mar 16, 2024 8:04 pm

Help for creating a script to delete ophran IPV6 PPP profiles except default profiles undeletable.

examples how to print that profiles code

/ppp profile print where !default [:local k $name; ([:len [/ppp secret find where profile=$k]] < 1)]

for remove (at your own risk), but do not check if the profiled is used elsewhere...

at your own risk code

/ppp profile remove [find where !default and [:local k $name; ([:len [/ppp secret find where profile=$k]] < 1)]]

Who is online

Users browsing this forum: handiansudianto and 6 guests