enabling/disabling Trial
Posted: Tue May 07, 2024 4:41 am
i have created a script that can disable/enable trial, the scenario is when a trial user is active it will automatically disable the trial, and when the active trial is done on his time alloted it will automatically enable the trial, this scenario will cause the hotspot to accept trial one users at a time, trial users have to wait for the hotspot portal trial button to be visible. tried and tested it for a 1 hour delay, my question is, can the mikrotik accepts a longer delay like 5 hours. below is the code, i used routeros-17.14.3-mmips.npk the code must be in trial profile on-login script.
/ip hotspot profile set [ find name="hsprof1" ] html-directory=sd1/public login-by=http-chap,mac-cookie
:delay 1h;
/ip hotspot profile set [ find name="hsprof1" ] html-directory=sd1/public login-by=http-chap,trial,mac-cookie trial-uptime-limit=1h trial-user-profile=trial
/ip hotspot profile set [ find name="hsprof1" ] html-directory=sd1/public login-by=http-chap,mac-cookie
:delay 1h;
/ip hotspot profile set [ find name="hsprof1" ] html-directory=sd1/public login-by=http-chap,trial,mac-cookie trial-uptime-limit=1h trial-user-profile=trial