Cannot run script

Hello, i came across the same issue, and i solved it on a wAP using rOS 6.37.1 and i found that this particular router uses a “flash” prefix before the hotspot directory. so, the script should go like this:

:global mac [/system routerboard get serial-number];
 
/file set flash/hotspot/login.html contents="
<html>
<head>
<meta http-equiv=\"refresh\" content=\"0; url=http://connect.socifi.com/?rad=yes&serial=$mac&client_mac=\$(mac)&client_ip=\$(ip)&userurl=\$(link-orig)&login_url=\$(link-login-only)\" />
<meta http-equiv=\"pragma\" content=\"no-cache\">
<meta http-equiv=\"expires\" content=\"-1\">
</head>
</html>"

Hope this helps and if it did, please provide some Reputation :wink:
JB.