acme-common: fallback to deprecated use_staging if the staging option is not set
authorSergey Ponomarev <stokito@gmail.com>
Sun, 26 May 2024 04:33:30 +0000 (07:33 +0300)
committerToke Høiland-Jørgensen <toke@toke.dk>
Sun, 26 May 2024 07:53:22 +0000 (09:53 +0200)
commitdd662f8a124fd385fc01732bee33c15c0d669a15
treeee4e9b4d960dea8acb0d9e8a36719416024fee10
parent4c4a7bd31da51e3040a5da55c504c5e97ac150e4
acme-common: fallback to deprecated use_staging if the staging option is not set

The use_staging option was deprecated in 9d2d8787cafdfb49339766a00ced422fa75cb883.
But it still has a bigger priority than the staging option.
This happens because config_get_bool returns 0 when the use_staging option wasn't set.
So the next check for the staging var emptiness is always false.

As the simplest fix, use the config_get staging that returns a plain string when the option is not set and if it's empty then fallback to the use_staging.

Once the use_staging option is removed we should get back to the config_get_bool staging.

Also use config_get_bool debug.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
net/acme-common/files/acme.init