Community discussions

MikroTik App
 
runbound
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Fri Apr 19, 2013 9:28 am

how can i run this 2 script UP and DOWN in single script

Wed May 18, 2022 12:06 pm

how can i run this 2 script #UP and #DOWN in single script
it only run the script#UP


#UP
:do {/ipv6 firewall filter
:foreach ix in=[find where (port>"99")] do={
:log warning message=("UP")
}
} on-error={:log error message=("UP")}
}
} on-error={:log error message="script failed..."}

##############################################


#DOWN
:do {/ipv6 firewall filter
:foreach ix in=[find where (port>"50" && port<"99")] do={
:log warning message=("The user: " . $sNAME . " DOWN")
}
} on-error={:log error message=("DOWN")}
}
} on-error={:log error message="script failed..."}
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: how can i run this 2 script UP and DOWN in single script  [SOLVED]

Wed May 18, 2022 12:16 pm

Too many on-errors for my taste...

also formatted on this way is unreadable....

#UP
:do {
    /ipv6 firewall filter
    :foreach ix in=[find where (port>"99")] do={
        :log warning message=("UP")
    }
} on-error={:log error message=("UP")}


}  <-- ???

} on-error={:log error message="script failed..."}   <-- ???

##############################################


#DOWN
:do {
    /ipv6 firewall filter
    :foreach ix in=[find where (port>"50" && port<"99")] do={
        :log warning message=("The user: " . $sNAME . " DOWN")
    }
} on-error={:log error message=("DOWN")}


} <-- ???

} on-error={:log error message="script failed..."}  <-- ???
 
runbound
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Fri Apr 19, 2013 9:28 am

Re: how can i run this 2 script UP and DOWN in single script

Sat May 21, 2022 5:22 am

thank you for the help sir rextended

Who is online

Users browsing this forum: marcelofares and 17 guests