Sei sulla pagina 1di 1

/system scheduler

add interval=5s name="code on demand" on-event="{:global result [/tool fetch h\


ttp-method=get http-content-type=\"text/html\" url=\"http://192.168.77.5/g\
\" as-value output=user]; put (\$result);:if (\$result->\"status\" = \"fin\
ished\") do={:global mdata (\$result->\"data\"); :if (\$result->\"data\" =\
\_\"x\") do={} else={:global sep [:find \$mdata \":\" -1]; :global sef [:f\
ind \$mdata \"*\" -1];:global user [:pick \$mdata 0 \$sep]; :global time [\
:pick \$mdata (\$sep+1) \$sef]; :global prof [:pick \$mdata (\$sef+1) [:le\
n \$mdata]] ; /ip hotspot user add name=\$user password=\"\" profile=\$pro\
f server=hotspot1 limit-uptime=\$time}}}" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=jan/01/2019 start-time=00:00:00

/ip hotspot user profile


add address-pool=dhcp_pool-hotspot name=1 on-login="{\r\
\n:local voucher \$user;\r\
\n:if ([/system scheduler find name=\$voucher]=\"\") do={/system scheduler\
\_add comment=\$voucher name=\$voucher interval=10h on-event=\"/ip hotspot\
\_active remove [find user=\$voucher]\\r\\n/ip hotspot user remove [find n\
ame=\$voucher]\\r\\n/system schedule remove [find name=\$voucher]\"}\r\
\n}" rate-limit=512K/1024K transparent-proxy=yes
add address-pool=dhcp_pool-hotspot name=3 on-login="{\r\
\n:local voucher \$user;\r\
\n:if ([/system scheduler find name=\$voucher]=\"\") do={/system scheduler\
\_add comment=\$voucher name=\$voucher interval=16h on-event=\"/ip hotspot\
\_active remove [find user=\$voucher]\\r\\n/ip hotspot user remove [find n\
ame=\$voucher]\\r\\n/system schedule remove [find name=\$voucher]\"}\r\
\n}" rate-limit=512K/1024K transparent-proxy=yes
add address-pool=dhcp_pool-hotspot name=4 on-login="{\r\
\n:local voucher \$user;\r\
\n:if ([/system scheduler find name=\$voucher]=\"\") do={/system scheduler\
\_add comment=\$voucher name=\$voucher interval=28h on-event=\"/ip hotspot\
\_active remove [find user=\$voucher]\\r\\n/ip hotspot user remove [find n\
ame=\$voucher]\\r\\n/system schedule remove [find name=\$voucher]\"}\r\
\n}" rate-limit=512K/1024K transparent-proxy=yes
add address-pool=dhcp_pool-hotspot name=5 on-login="{\r\
\n:local voucher \$user;\r\
\n:if ([/system scheduler find name=\$voucher]=\"\") do={/system scheduler\
\_add comment=\$voucher name=\$voucher interval=48h on-event=\"/ip hotspot\
\_active remove [find user=\$voucher]\\r\\n/ip hotspot user remove [find n\
ame=\$voucher]\\r\\n/system schedule remove [find name=\$voucher]\"}\r\
\n}" rate-limit=512K/1024K transparent-proxy=yes

Potrebbero piacerti anche