feat: update $isUpdated statement and remove www.{HOSTNAME}

This commit is contained in:
2025-09-08 19:04:37 +00:00
parent 86c40e03f8
commit 2bec27f397
2 changed files with 8 additions and 2 deletions

View File

@@ -90,8 +90,8 @@ services:
container_name: guezoloic-web
restart: unless-stopped
environment:
- VIRTUAL_HOST=www.${HOSTNAME},${HOSTNAME}
- LETSENCRYPT_HOST=www.${HOSTNAME},${HOSTNAME}
- VIRTUAL_HOST=${HOSTNAME}
- LETSENCRYPT_HOST=${HOSTNAME}
- LETSENCRYPT_EMAIL=${EMAIL}
networks:
- proxy-network

View File

@@ -83,6 +83,12 @@ create_env_variable() {
echo "$key=$value" >> "$file"
info_print "$key set." $SUCCESS_FLAG
fi
else
if grep -Eq "^${key}=" "$file" 2>/dev/null; then
sed -i "s/^$key=.*/$key=$value/" "$file"
else
echo "$key=$value" >> "$file"
fi
fi
}