Fix ip import (#10964)

* Rename import_local_ip to get_local_ip

Replaces all references to the helper function import_local_ip with get_local_ip across scripts and documentation for consistency. Updates usage examples and comments to reflect the new function name.

* Rename get_local_ip to get_lxc_ip and update usage

Replaces all references to get_local_ip with get_lxc_ip across scripts, documentation, and templates for clarity and consistency. Updates the implementation in core.func to improve IP detection for LXC containers, and adjusts helper functions in addon scripts accordingly.
This commit is contained in:
CanbiZ (MickLesk)
2026-01-19 17:32:44 +01:00
committed by GitHub
parent 38a0757e4e
commit d6811a3383
10 changed files with 36 additions and 19 deletions

View File

@@ -434,12 +434,12 @@ create_self_signed_cert
## Utility Functions
### `import_local_ip`
### `get_lxc_ip`
Set the `$LOCAL_IP` variable with the container's IP address.
```bash
import_local_ip
get_lxc_ip
echo "Container IP: $LOCAL_IP"
# Use in config files
@@ -528,7 +528,7 @@ msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
PG_VERSION="17" setup_postgresql
PG_DB_NAME="myapp" PG_DB_USER="myapp" setup_postgresql_db
import_local_ip
get_lxc_ip
# Download app using fetch_and_deploy (handles version tracking)
fetch_and_deploy_gh_release "myapp" "example/myapp" "tarball" "latest" "/opt/myapp"
@@ -664,7 +664,7 @@ PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,curl,gd,intl,mbstring,mysql,x
setup_composer
setup_mariadb
MARIADB_DB_NAME="myapp" MARIADB_DB_USER="myapp" setup_mariadb_db
import_local_ip
get_lxc_ip
# Download pre-built release (with asset pattern)
fetch_and_deploy_gh_release "myapp" "example/myapp" "prebuild" "latest" "/opt/myapp" "myapp-*.tar.gz"