acme-acme.sh: declare staging_moved variable
authorVladimir Kochnev <[email protected]>
Wed, 1 Oct 2025 17:48:02 +0000 (20:48 +0300)
committerToke Høiland-Jørgensen <[email protected]>
Thu, 2 Oct 2025 11:14:11 +0000 (13:14 +0200)
It's possible that staging_moved variable is undeclared while being
accessed. Lets explicitly declare it.

Signed-off-by: Vladimir Kochnev <[email protected]>
net/acme-acmesh/files/hook.sh

index f6591de718075df78b8adaa38c610dac449570a0..a29bade1ac45c422047822d01381cfc87994c984 100644 (file)
@@ -58,6 +58,7 @@ get)
 
        log info "Running ACME for $main_domain with validation_method $validation_method"
 
+       staging_moved=0
        if [ -e "$domain_dir" ]; then
                if [ "$staging" = 0 ] && grep -q "acme-staging" "$domain_dir/$main_domain.conf"; then
                        mv "$domain_dir" "$domain_dir.staging"