Quantcast
Viewing all articles
Browse latest Browse all 16039

Scripting • Script breaks on ROS 7 due to changes in date format

Can you help me? I have this script that changes the user's password on the hotspot, but in the new version it no longer works due to the date format change.
Anyone who can help me, thank you

Code:
:local senha;:local months ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");:local ds [/system clock get date]:local month [ :pick $ds 0 3 ];:local mm ([ :find $months $month -1 ] + 1);:if ($mm < 10) do={ :set $mm ("0" . $mm); }:set  senha ( "user*" . $mm * [:pick $ds 4 6])/ip hotspot user set "user" password=$senha

Statistics: Posted by jandervga — Wed Feb 14, 2024 8:57 pm



Viewing all articles
Browse latest Browse all 16039

Trending Articles