uacme: do not override production state dir variable
authorLeonardo Mörlein <git@irrelefant.net>
Sun, 11 Apr 2021 23:30:39 +0000 (01:30 +0200)
committerRosen Penev <rosenp@gmail.com>
Sat, 24 Apr 2021 08:16:57 +0000 (01:16 -0700)
commitb80781150b51c4cda9810197cc81659a5e17fdfb
tree6e8956f3386db137d65ffff90036666d5c30ee4a
parentda3be62a9fbc636f8925c997e62a75459fe8f3cd
uacme: do not override production state dir variable

With this commit, issue_cert() can be called multiple times alternating
between staging and production certificates within a script.

Before this commit, the production state dir was stored in $STATE_DIR.
But in the case of $use_staging=1, this variable was overwritten in
issue_cert() with $STAGING_STATE_DIR. This made it impossible to call
issue_cert() with $use_staging=0 afterwards. Now the production state
dir is stored in $PRODUCTION_STATE_DIR. This way it is not overridden
anymore and issue_cert() can be called multiple times alternating with
production and staging.

Signed-off-by: Leonardo Mörlein <git@irrelefant.net>
net/uacme/files/run.sh