GideonLeGrange / mikrotik-java

A Java client implementation for the Mikrotik RouterOS API.
Apache License 2.0
181 stars 101 forks source link

unknwon parameter when adding user hotspot profile with on-login script #75

Closed cahyowhy closed 4 years ago

cahyowhy commented 4 years ago

i tried to add user hotspot profile but get an unknown parameter error..

this is my command

/ip/hotspot/user/profile/add name="cahyo-cek-2" idle-timeout=none keepalive-timeout=2m status-autorefresh=1m shared-users=1 add-mac-cookie=true mac-cookie-timeout=3d parent-queue=none rate-limit=512k/512k on-login=:put (",re,3000,12d,3000,,Enable,"); /system scheduler add name="usercahyo-cek-2-$user" interval=12:00:00 on-even="/ip hotspot active remove [find user=\"$user\"] ; /ip hotspot user set \"$user\" disable=yes ; /system scheduler remove [find name=usercahyo-cek-2-$user]"

btw when i remove the on-login script it doesnt error.

this is my environment

dependencies {
  compile group: 'me.legrange', name: 'mikrotik', version: '3.0.3'
}

the script above is succeed when i execute on npm micronode

GideonLeGrange commented 4 years ago

I don't know. The unknown parameter error is returned by RouterOS on the Mikrotik, so it does not like the command that was passed.

I do not know if setting up scripts using the RouterOS API is possible.I would suggest you research this, and if it is actually possible and you feel it is a bug, re-open or create a new issue.