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
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