is there an another way to generate vouchers other than through lime-app?
am asking because pirania is there in my LRos and captive portal loads when enabled. just don’t know how to issue and manage vouchers. is there a command line option to do this?
Oi Luandro, Boa!
I’m trying to add new vouchers using “voucher” commando on cli, but i don’t succes…
it’s like captive_portal.auth_voucher (mac,code) ??
I tryed:
captive_portal.add_voucher (“xx:…:xx:xx”,“cara”)
-ash: syntax error: unexpected word (expecting “)”)
-ash: syntax error: unexpected “)”
voucher add xx:…:xx:xx, cara
/usr/bin/lua: /usr/bin/voucher:148: attempt to call field ‘?’ (a nil value)
stack traceback:
/usr/bin/voucher:148: in main chunk
[C]: ?
i was finally able to create a voucher using cli. thanks to @luandro sharing this link
to summarize,
ssh into librerouter
start pirania - captive_portal start or uci set pirania.base_config.enabled=1 && uci commit
add voucher - voucher add_voucher test voucher123 1617062399 10 10 2 test - is a name to identify the voucher (not seen the use of it yet) voucher123 - is the voucher code / coupon code used to log in on the pirania portal 1617062399 - is the epoch time for end of day tomorrow (29 Mar 2021). (one can use this site for generating epoch times) 10 10 - are upload and download limits (not sure if they work) 2 - number of devices that this voucher can be used with