alexyao2015/BitBetter

cli generate license

Closed this issue · 3 comments

Hi,
I would like to generate (and e-Mail) licenses through a script.
I tried figuring out the cmdline syntax, but did not succeed using:
docker run -it --entrypoint "/bin/sh" --rm ghcr.io/alexyao2015/bitbetter:licensegen-latest
and then
dotnet /app/licenseGen.dll --core /app/Core.dll --cert /cert.pfx org testorg test.dude@test.te aaaa-bbbb-cccc-dd-eeeee
but it didnt work. Adding quotes didnt work either.
The manual says: ./src/licenseGen/run.sh /Absolute/Path/To/BitBetter/.keys/cert.pfx org "Name" "EMail" "Install-ID used to install the server"
Error:

Oops: System.ArgumentNullException: Value cannot be null. (Parameter 's')
   at System.Double.Parse(String s)
   at bitwardenSelfLicensor.Program.<>c__DisplayClass0_3.<Main>b__9() in /licenseGen/Program.cs:line 261
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at bitwardenSelfLicensor.Program.Main(String[] args) in /licenseGen/Program.cs:line 286

I would then like to replace the entrypoint so I can generate licenses through a script which uses the image.
Any idea?

Looks like the original generator code has a bug from upstream

It seems I figured it out: You need to set more than the documented params
org testorg test.dude@test.te aaaa-bbbb-cccc-dd-eeeee 32767 testorgname