Am 09.09.25 um 12:05 PM schrieb Fabian Grünbichler:
> by explicitly checking for already expired certificates and adapting the
> message in that case.
> 
> Signed-off-by: Fabian Grünbichler <[email protected]>

Reviewed-by: Fiona Ebner <[email protected]>

> ---
>  bin/pveupdate | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/bin/pveupdate b/bin/pveupdate
> index 9984c9369..c5356c885 100755
> --- a/bin/pveupdate
> +++ b/bin/pveupdate
> @@ -125,7 +125,10 @@ eval {
>          PVE::Tools::run_command(['systemctl', 'reload-or-restart', 
> 'pveproxy']);
>      };
>  
> -    if (PVE::Certificate::check_expiry($certpath, time() + 14 * 24 * 60 * 
> 60)) {
> +    if (PVE::Certificate::check_expiry($certpath)) {
> +        # already expired
> +        $renew->("expired, renewing...");
> +    } elsif (PVE::Certificate::check_expiry($certpath, time() + 14 * 24 * 60 
> * 60)) {
>          # expires in next 2 weeks
>          $renew->("expires soon, renewing...");
>      } elsif (!PVE::Certificate::check_expiry($certpath, time() + 2 * 365 * 
> 24 * 60 * 60)) {



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to